Get filter conditions

Tags: #<Tag:0x00007f0b113075c8>

Is there any method to get applied filters. As I want to apply filters on custom callback and I cannot use before/after filtersave callbacks for this reason. I have tried using hot. hot.getPlugin(‘filters’).conditionCollection but it does not give me conditions applied.

Hi @chunnumunnu99

You could use addCondition based on our API. Here is a link to docs - https://handsontable.com/docs/7.4.2/Filters.html#addCondition

Does it meet your goal?

@piotr.nowak I want to get currently applied filter to send with ajax call so that I can use them in db queries. Your answer is about applying the filters to handsontable.

Hi @chunnumunnu99

Sorry for keeping you waiting with this one. By reading

Is there any method to get applied filters

I understand that you need the afterFilter hook. Example http://jsfiddle.net/handsoncode/c8phv3dy/ It returns the information about the attached filters. And if you want to perform server-side filtering you can use the beforeFilter hook, not only to get the exact filter settings but also to block the filtering on the front-end.