From 09534003210365879bc06e88da2a751aec89348e Mon Sep 17 00:00:00 2001 From: kolaente Date: Fri, 22 May 2020 17:32:18 +0200 Subject: [PATCH] Enable resetting search input --- src/components/lists/views/List.vue | 3 +-- src/components/tasks/helpers/taskList.js | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/components/lists/views/List.vue b/src/components/lists/views/List.vue index 5aab6678..4a49dcc7 100644 --- a/src/components/lists/views/List.vue +++ b/src/components/lists/views/List.vue @@ -19,8 +19,7 @@ diff --git a/src/components/tasks/helpers/taskList.js b/src/components/tasks/helpers/taskList.js index 0c7833e9..de92b7db 100644 --- a/src/components/tasks/helpers/taskList.js +++ b/src/components/tasks/helpers/taskList.js @@ -112,9 +112,11 @@ export default { }) }, searchTasks() { - if (this.searchTerm === '') { + // Only search if the search term changed + if (this.$route.query === this.searchTerm) { return } + this.$router.push({ name: 'list.list', query: {search: this.searchTerm}