Reset input field

This commit is contained in:
Joe committed 2021-04-30 03:06:26 +01:00
1 parent d741f90d44
commit c3619066ea
1 file changed
+5 -1
@@ -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
}