Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Row filtering #1002

Open
kevinlovescoffee opened this issue Oct 19, 2024 · 2 comments
Open

Row filtering #1002

kevinlovescoffee opened this issue Oct 19, 2024 · 2 comments

Comments

@kevinlovescoffee
Copy link

We are currently filtering rows by adding a hidden property to rows that we want to hide. In the rowHeight prop we set the hidden row's height to 0. So, something like: rowHeight={(index) => (data[index]?.hidden ? 0 : 34)}. This produces the result that we want, but we noticed with larger data sets (around 25,000) rows there are performance issues. Is there are a better way to go about filtering rows? If not, it would be amazing to have this functionality!

@Druthi
Copy link

Druthi commented Oct 29, 2024

  • 1 on this! I need the same functionality too asap

Added an issue here #1003

@domehead100
Copy link

Just poking around, and I haven't used this grid yet (though I have used other similar grids), ... but I would think that you would want to hide rows in the data itself rather than when rendering.

One way to do this, assuming you want to hide arbitrary rows, would be to keep the hidden row indexes or ids in a map and use that map to filter the dataset so that they are not presented to the grid in the first place in getData. Unhiding the rows or even a single row, would be removing it from the hidden rows map and then refreshing the grid. The grid renders so fast that it should appear instantaneous to the end user.

Maybe I'm wrong, just a suggestion.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants