Comcast / Comcast/react-data-grid
Allow specifying overscanThreshold as prop
- Dominant language
- TypeScript
- Stars
- 7.7k
- Forks
- 2.2k
- Avg merge
- 1d 2h
- Merged PRs (30d)
- 33
Description
## Use case
My grids render rows that fetch their own data via RTK Query on mount. This works well with `enableVirtualization`, but the default `overscanThreshold` of `4` is a little too low in practice. When users scroll quickly, many unloaded rows come into view and they briefly display loading placeholders. I can afford to render more rows ahead of the viewport, which would trigger earlier fetches and eliminate most of this flicker.
## Proposed solution
Expose `overscanThreshold` as a `DataGrid` prop so it can be configured per grid. This would let developers balance performance and perceived smoothness based on their actual data-loading behaviour.
Contributor guide
Assessment
This issue has not been assessed yet.