I’d like to add a custom condition in the filter plugin, how can I do that?
Our use case is that we implement our own dropdown menu for filters (like in handsontable, but with our custom UI) we have “Filter by condition” (two items) and logical operator (and/or) like in handsontable dropdown menu. currently, we can trigger filter by control filtering programmatically as suggested in this blog
We have no problem so far, but we’d like to add our own custom condition other than the list here
https://handsontable.com/docs/javascript-data-grid/api/filters/#addcondition (e.g., only cell is valid)
We tried to search and found that we can use hide plugins as suggested here
but we don’t want to do that way because we need to implement “and/or”(conjunction/disjunction) with ourself, and filter by the condition is also applied related to “filter by value”. Also, filters can be applied to multiple columns. It’s quite hard(and takes a lot of effort) to keep these states and logic by ourselves.
The best solution we can think of is we would like to add our own custom condition, so that “and/or”(conjunction/disjunction) handle automatically.
We digged into Handsontable and found that Handsontable also registers builtin filter condtion
So how do we register our own custom filter condition?