fix: clear filters when query parameters are removed (#78)

This commit is contained in:
João Peixoto
2021-03-10 17:40:37 +00:00
committed by GitHub
parent 472991fc5a
commit fb3c34b40e
+8
View File
@@ -150,11 +150,19 @@ export default {
queryProptertyWatchlist() {
return `${this.activeCategory}|${this.activeTags}|${this.searchedText}|${this.activeAuthor}`
},
urlUpdate() {
return this.$route.query
},
},
watch: {
queryProptertyWatchlist() {
this.updateQuery()
},
urlUpdate() {
if (Object.keys(this.$route.query).length === 0) {
this.$store.commit('appState/clearFilters')
}
},
},
created() {
let categories = []