How to identify, if filter is removed

Tags: #<Tag:0x00007f8b2a22b9d0>

Hi,
I have implemented filter in Handson table. To identify filtering I am using afterFiler hook. But how to identify filter is removed.

Thanks

Hey @fayejitendra

if the first element of the afterFilter hook is an empty array it means that there are no filters applied.

If you’d like to check if there was a filter before and it has been erased you’d need to check the previous call for the beforeFilter hook.

what are the parameters in afterFilter and beforeFilter hook ,…could you please let me know

Sure! The beforeChange and afterChange turn the same information.

The only parameter that they return is something that we call a condition stack


src https://handsontable.com/docs/7.3.0/Hooks.html#event:beforeFilter

It is an object that contain all the changes make on filters.

Each change in filter is a separate object that returns a column index and a type of filter attached.