T
TanStack2y ago
other-emerald

Single column multi filter

Does anyone have any example of a multi filter on a single column?
1 Reply
other-emerald
other-emeraldOP2y ago
I have unique values for the filters displaying as buttons and can set a single filter with the following:
sortedUniqueValues.map((value) => {
return (
<Button
dataQaId="test"
onClick={() => {
column.setFilterValue((updater: Updater<any>) => {
value;
});
}}
key={value}
>
{value}
</Button>
);
})
sortedUniqueValues.map((value) => {
return (
<Button
dataQaId="test"
onClick={() => {
column.setFilterValue((updater: Updater<any>) => {
value;
});
}}
key={value}
>
{value}
</Button>
);
})
But I want to be able to click multiple of them and add them to the list of filters for the single column so for example if I have a firstName column and unique filters are "Bob" and "Dave" I want to be able to click both of those and show them on the table

Did you find this page helpful?