How to reset filter sort config?

Hi,

We are using handsontable in Angular project, Once we filter or sort any columns, Can we reset the filter and sort on the handsontable, like if I click reset or Discard changes button, In the button click I’m applying the preserved data which is taken in initial load. this data doesn’t have any filter or sort config,

How to invoke handsontable afterinit method from outside by clicking a button like Discard changes?

How can we achieve this? Kindly help, Please let know any more detail needed.

Hi @prabu.kuppusamy

You could reset filter (or sort) by using our API for these plugins. Here is an example of reset filters - https://codesandbox.io/s/reset-filters-button-in-angular-yced8?file=/src/app/hello.component.ts

If you filter some data in the table and click the button Reset filters you get an unfiltered table.

Does it work for your project?

Hi, I have tried your solution, working for me, Thank you so much… :slight_smile:

I’m glad to hear that I could help you.