Skip to content
Snippets Groups Projects
Verified Commit 712ba2af authored by Erwan Rouchet's avatar Erwan Rouchet
Browse files

Prevent erasing filters when the filter bar is disabled

parent f47d316e
No related branches found
No related tags found
1 merge request!1053Prevent erasing filters when the filter bar is disabled
......@@ -198,6 +198,7 @@ export default {
* Erase an existing filter by name.
*/
eraseFilter (name) {
if (this.disabled) return
const index = this.selectedFilters.findIndex(({ filter }) => filter.name === name)
if (index >= 0) this.selectedFilters.splice(index, 1)
},
......@@ -206,6 +207,7 @@ export default {
* Erase all the filters at once.
*/
reset () {
if (this.disabled) return
this.selectedFilters = []
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment