Skip to content

Commit

Permalink
fix select empty filter issue
Browse files Browse the repository at this point in the history
  • Loading branch information
skie committed Oct 31, 2024
1 parent a265cb0 commit cf5c5b9
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions webroot/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ const SearchApp = {
this.add({filter: filter, ...this.values[filter]});
}
if (keys.length == 0) {
this.add();
// this.add();
}
}
const appRoot = document.getElementById(window._search.rootElemId);
Expand Down Expand Up @@ -241,7 +241,10 @@ const AddNewFilter = {
return this.components.findIndex(el => el.filter == filter) >= 0;
},
selectFilter(event) {
this.$emit('add-filter', {filter: this.search_filter});
if (this.search_filter != null && this.search_filter != '') {
this.$emit('add-filter', {filter: this.search_filter});
this.search_filter = '';
}
},
},

Expand Down

0 comments on commit cf5c5b9

Please sign in to comment.