vincjo / datatables

A toolkit for creating datatable components with Svelte
https://vincjo.fr/datatables
MIT License
426 stars 14 forks source link

How do you remove any applied filters? #15

Closed mattpurlandncc closed 1 year ago

mattpurlandncc commented 1 year ago

Not sure if I'm missing something, but how do you remove any applied filters?

For example, I'm not using the table headers/input field to filter data - but programmatically using radio buttons, and so I need to be able to programmatically reset the filters

vincjo commented 1 year ago

I just exposed the method in the DataHandler. As there is handler.clearSearch(), there is now handler.clearFilters()

The problem is that the input values ​​are not bound with the filters store. I haven't looked yet if I can go further, please let me know if this can be improved

You can test the method here: https://vincjo.fr/datatables/test

mattpurlandncc commented 1 year ago

@vincjo works perfectly, thanks