afterFilter - distinguishing user triggered changes from programmatic changes

Tags: #<Tag:0x00007f2495aed010>


"@handsontable/react": "^11.0.1",
"handsontable": "^11.0.1",

I’m trying to save filter settings in state to restore filters when react component update.
I use afterFilter hook to save filterStack to state and then when I need to restore it, I use

  const plu = hot.getPlugin('Filters');
  for (const filter of this.state.filterStack) {
    plu.addCondition(filter.column, filter.conditions[0].name, filter.conditions[0].args[0]);

The problem is that when I run filter(), this also triggers afterFilter and I get into a loop.

Is there any way to distinguish whether afterFilter was caused by user action or by programmatic change?

Thank you,

Hi @marek.kowalczyk

Unfortunately at the moment React state management isn’t working as it should with Handsontable, you can read more about this topic here:

We will address that issue as soon as possible.

I am happy to announce that the epic at is solved in v12. If you would have any issues with updating to the newest version please contact us at