I have a custom filter, let's call it private. So, whenever it's present, I only want to show the private topics. If it's not present, I show all the topics.
So in order to apply it, I'm using:
bus.$emit('vue-tables.filter::private', true);
However, I can't find an event to remove that filter from the table filters. Is it possible just now? Or does it need to be implemented?
@matfish2 it's working for me doing something like this on register-server-filters.js
var bus = require('../bus');
module.exports = function() {
this.opts.customFilters.forEach(function(filter) {
bus.$on('vue-tables.filter::' + filter, function(value) {
this.customQueries[filter] = value;
this.refresh();
}.bind(this));
bus.$on('vue-tables.remove-filter::' + filter, function() {
delete this.customQueries[filter];
this.refresh();
}.bind(this));
}.bind(this));
}
Do you think it's possible to add it to the the official repository? Thanks.
Seems a bit like an edge case. Maybe if others will ask for this functionality.
@matfish2 great - I'll keep it in my fork then. If you ever add this functionality, just let me know and I'll go back to use your version. 馃槃
+1 for this feature.
At the moment I am using custom filters and I am not sure how I can reset the filters, so I can see all the items in the table again.
Thank you
Most helpful comment
+1 for this feature.
At the moment I am using custom filters and I am not sure how I can reset the filters, so I can see all the items in the table again.
Thank you