From 7480e83bd4f0e6077eda7ea66c750fb09d9c391b Mon Sep 17 00:00:00 2001 From: Alex Velez Date: Thu, 15 Feb 2024 16:22:26 -0500 Subject: [PATCH] Fix clear search --- .../plan/CreateExamPage/ResourceSelection.vue | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/ResourceSelection.vue b/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/ResourceSelection.vue index 5919fada9f8..33c8dfb360d 100644 --- a/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/ResourceSelection.vue +++ b/kolibri/plugins/coach/assets/src/views/plan/CreateExamPage/ResourceSelection.vue @@ -26,7 +26,7 @@ -
+

{{ selectFromBookmarks$() }}

@@ -499,14 +499,18 @@ return ''; }, handleSearchTermChange(searchTerm) { - this.$router.push({ - query: { search: searchTerm }, - }); + const query = { + ...this.$route.query, + search: searchTerm, + }; + this.$router.push({ query }); }, clearSearchTerm() { - this.$router.push({ - query: { search: null }, - }); + const query = { + ...this.$route.query, + }; + delete query.search; + this.$router.push({ query }); }, }, };