I'm using the most bodacious react-virtualized component in a calendar-like application that I'm working on.
I'm using three grids with ScrollSync
like in this example but also using cellRangeRenderer
to render "pills" on top of the grid.
The application works very nicely however I am finding that on slower computers that the rendering while scrolling can be pretty slow (there can be around 40 columns by 20 rows and up to 40 or so pills rendered in a single view)
Some of the people that will be using this app actually don't really need virtualization because the overall table of data is not that large. So, what I'd like to do is keep using the general framework that react-virtualized
provides but for users with rows < x but just render the whole grid in one go to hopefully improve performance. For users with rows > x then grids will be virtualized as normal.
I know that the cellRangeRenderer
just receives a start and end index for rows and columns and then returns an array of divs for each cell of the grid, so I can imagine just sending the start and end index for the entire grid and then the whole grid will be returned. I'm just not sure how to then override the re-render on scroll.
I'd be interested to hear any suggestions or similar experiences.