I'm trying to add excel like filtering to react-data-grid(v7) with primereact multiselect and running into some problems with the dropdown closing. By excel like filtering I mean when you apply a filter that updates all the other filters options instead of keeping the total options always. Here is a codesandbox that shows the problem (here is the example it was based off). In the sandbox I have a button that controls if the filters pull from rows
or filteredRows
. You can see that when the button says rows
it works but that wont filter the dropdowns since it's using the whole dataset. When the button says filteredRows
that filters the dropdowns but then also closes the dropdown on change.
Also you would notice this kind of makes a multiselect useless since the current filter your on will always be filtered down to the 1 option you picked. So the current filter being changed should not change options but all the others filter options should change.
To sum it up:
- I want the dropdown to stay open even when any dropdown options change
- The current filter being changed should not change options but all the others filter options should change.
I think the problem has to do with columns
re-rendering when using filteredRows
vs rows
.