I've been tinkering a lot with custom filters, and managed to apply one by using external inputs. However, it would be very nice if the standard inputs provided on each column when filterByColumn is enabled to trigger custom filters. It would be very useful, e.g. in presence of deeply structured data (i.e. some fields are, in turn, Objects).
Of course, this trivial example filters data with a fixed 'horse' query, but it's very straightforward to use an external text input to do the same exact thing.
Now, what I would like to do is to intercept the 'vue-tables.filter::structured' and do something like:
I tried it, to no avail. This is because the chain of events emitted is:
vue-tables.filter $emit by <Root>
filter $emit by <ClientTable>
vue-tables.filter::mystructured $emit by <Root> // That's my custom filtering event, but then...
vue-tables.filter::structured $emit by <Root> // This should not happen!
filter::structured $emit by <ClientTable>
Is there any way to prevent the default filtering action? If necessary I may quickly prepare a JSFiddle.
I've been tinkering a lot with custom filters, and managed to apply one by using external inputs. However, it would be very nice if the standard inputs provided on each column when
filterByColumn
is enabled to trigger custom filters. It would be very useful, e.g. in presence of deeply structured data (i.e. some fields are, in turn, Objects).Consider this minimal example:
Vue VM:
HTML:
Structured
Vue template:Of course, this trivial example filters data with a fixed
'horse'
query, but it's very straightforward to use an external text input to do the same exact thing.Now, what I would like to do is to intercept the
'vue-tables.filter::structured'
and do something like:I tried it, to no avail. This is because the chain of events emitted is:
Is there any way to prevent the default filtering action? If necessary I may quickly prepare a JSFiddle.