Filter customisation and pass distinct values

Hi,

I just started using the PRO version of handsontable, and I have some small question about the filters feature.
We have table that contains thousands of rows (even hundred of thousands), and all of the data is coming from the API using a custom pagination (using the afterVerticalScroll callback to load more rows), so as you can expect, we don’t have all of the distinct value at first load.

Is it possible to pass to the filters an array of all the distinct value we have in our table ? At the moment it just show the one that are loaded.

As you could guess we have an API filtering as well, so we would need to disable the actual filtering and call another method from that action if that possible ?

Is it possible to do a multiple filtering of one column ?

Is it possible to customise the filters menu ? Change some design (to match with the app), change the list of Filter condition etc…

Thanks for the help ! :slight_smile:

Hi @marc.antoine
currently this option is not available. Inside the Filters plugin we’re calling methods like: getSelectedColumn and getDataAtCol and with current structure you can pass any external source of data to be filtered what (as I guess) will be a must for a paginated table.

Hey @aleksandra_budnik,

Which option are you talking about exactly ?

Also I managed to add some new condition in the select by using the afterDropdownMenuShow hook and then populating the array this way :
instance.hot.getPlugin('filters').conditionComponent.elements[0].items.push({ inputsCount: 1, key: 'gte', name: 'Greater than or equal'});

I know this is not the best, but this is the only way I could find to do this.

Now for the second part of your answer I am not sure to understand how I can pass the external source of data ? Do you mind explain it a little bit more ?

Many thanks!

Sorry that was a really misguiding mistake. It should be you can't pass

Oh… Is there a way to override part of the plugin then?

there is always a way to override part of the plugin but there is a possibility that it won’t work after updating to newest version so I do not recommend it.