Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

Reset input field

Joec3619066ea3d
diff --git a/examples/vue3-ts-todo-list/src/components/TodoList.vue b/examples/vue3-ts-todo-list/src/components/TodoList.vue
index 4e91f61d0c0..6e55841dc30 100644
--- a/examples/vue3-ts-todo-list/src/components/TodoList.vue
+++ b/examples/vue3-ts-todo-list/src/components/TodoList.vue
@@ -54,8 +54,12 @@ export default defineComponent({
return
}
try {
+ // Try and wrie the data to to the database
const todo = await addTodo({ user_id: userSession.value.user.id, task: task.value })
- // If there was no response, dont do anything.
+
+ // Reset inptut feild
+ task.value = ''
+
if (!todo) {
return
}