Comcast / Comcast/react-data-grid
Allow specifying overscanThreshold as prop
- Vorherrschende Sprache
- TypeScript
- Sterne
- 7.7k
- Forks
- 2.2k
- Ø Merge
- 1 T. 2 Std.
- Gemergte PRs (30 T.)
- 33
Beschreibung
## 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.
Beitragsleitfaden
Rechercherichtung
Beginnen Sie damit, die DataGrid virtualization-Konfiguration und den bestehenden Standardwert von overscanThreshold zu lokalisieren, und verfolgen Sie dann, wie DataGrid props die virtualization erreichen. Machen Sie den Wert pro Grid verfügbar, wobei der Standardwert 4 beibehalten wird, und überprüfen Sie, dass beim schnellen Scrollen die konfigurierte Anzahl von Zeilen im Voraus gerendert wird.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- react, typescript
- Bereich
- frontend
- Issue-Typ
- Feature
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 55/100