Skip to content
Snippets Groups Projects
Commit 562b9473 authored by Bastien Abadie's avatar Bastien Abadie
Browse files

Merge branch 'filter-bar-reset' into 'master'

Add a clear all button to the filter bar

Closes #766

See merge request !1038
parents ec557b5e 6d3e8d30
No related branches found
No related tags found
1 merge request!1038Add a clear all button to the filter bar
......@@ -29,6 +29,12 @@
v-on:erase="erase"
v-on:submit="submit"
/>
<button
class="delete"
title="Remove all filters"
v-if="selectedFilters.length"
v-on:click="reset"
></button>
</div>
</div>
</template>
......@@ -196,6 +202,13 @@ export default {
if (index >= 0) this.selectedFilters.splice(index, 1)
},
/**
* Erase all the filters at once.
*/
reset () {
this.selectedFilters = []
},
/**
* Only propagate the FilterInput's submit events when no filter is currently being edited
*/
......
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