Skip to content

Allow specifying overscanThreshold as prop #3929

@iranana

Description

@iranana

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions