Skip to content

Commit

Permalink
Fix clear search
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexVelezLl committed Feb 15, 2024
1 parent 9a5e091 commit 7480e83
Showing 1 changed file with 11 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</KGridItem>
</KGrid>

<div v-if="!searchQuery && !isTopicIdSet && bookmarks.length && !showBookmarks">
<div v-if="!isTopicIdSet && bookmarks.length && !showBookmarks">

<p>{{ selectFromBookmarks$() }}</p>

Expand Down Expand Up @@ -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 });
},
},
};
Expand Down

0 comments on commit 7480e83

Please sign in to comment.