Reapply saved filters - best way? (PRO)

Hi,
I’m currently saving column-filters and reapplying them when the user reload the page using the Filter-plugin
(https://handsontable.com/docs/6.1.1/demo-filtering.html, custom as-you-type).
I had a hard time knowing where to put the reapply-function and ended up running it on a setTimeout() in hot.afterLoadData().
The timeout is set to 500ms, which seems to be working.

What/where is the best way/place to run the reapply?
A timer does not seem to be the correct way.

Thanks!

That is actually a good place if you ask me. You can also try afterInit hook.

I need to have the setTimeout() for it to work. Callling it directly from hot.afterLoadData() causes error in HOT.
Works, but maybe not optimal.

You should be able to shorten the 500ms time if you do not have a larger number of rows. Usually table needs some time to reload and if you put filters on a table that did not load entirely you’ll get a message that the row does not exist.