Show specific values in filters

Tags: #<Tag:0x00007fc675d39030>

Hello, I have a handsontable in which i am getting filters from DB, the filters applied correctly to the data and show filtered data.

handsontable

The issue is i am still getting all the values of original array i just want to show filtered array values in filter.

Hi @bashialee

If I good understand your question you would like to remove/hide filtered data from filters?
In the attached file, do you want to disappears Ut and dignissim from the filters?

This isn’t possible, unfortunately.
Filters plugin hides the filtered out rows in the table. But doesn’t hide it in filters itself.
If you would it, you couldn’t filter them out afterwards.

I don’t want to filter them afterwards, i just want to hide UT and dignissim. How can i do it? Because currently the Array coming for DB is about 30k rows and after filtering it becomes 10k and i just want to show those 10k rows after applying filters.

Don’t want to filter them afterward, because these filters will be set by Admin and the user will just be able to apply filters of filtered data not the whole data.

If you want to hide data from the table you have to click in the OK button, or programmatically - https://handsontable.com/docs/7.4.2/Filters.html#addCondition

On the other hand, if you want to hide filtered data from the filters itself you can’t do this. We don’t have this option.

I just want to show filtered data filters in Table. e.g if my filtered data has ids: [1,2] it should just show 1 and 2 in filters not other hidden ids [3,4,5,6,7] that are not in filtered array

I’m not sure what do you mean by ids. Can you attach a demo where we can reproduce the issue? Please describe all the steps to do so.

Nevertheless, you can filter only from the dataset you to pass to the table. Only in this respect is the data possible to filter and filter out.

As you can see in this demo - https://jsfiddle.net/6vkrtobu/ - you can operate only within the data you pass to hot.

Let me tell you this is the data without filters.
handsontable1

Now this is the filtered data i applied filter on LastName and i now my filters options are limited to filtered list, only LastName has all the data with filters, but member number has 4 values not all the values.

Ok. I see. Thanks @bashialee for a clear explanation.

This is intentional behaviour.
After filtering the data is trimming. And this is the reason why you then work a limited data source.