Skip to content

[data grid] loading overlay does not cover the bottom row on scroll when a top pinned row is present #22337

@vakha30

Description

@vakha30

Steps to reproduce

Steps:

  1. Open this link to live example: https://codesandbox.io/p/sandbox/datagrid-loading-overlay-forked-83gn94?file=%2Fsrc%2FApp.tsx
  2. Scroll the grid body down.
  3. Notice that the bottom row is not covered by the overlay.

Current behavior

When scrolling down, the bottom row peeks out from under the overlay — the overlay does not stretch / follow the viewport, leaving a gap at the bottom whose height equals the height of the pinned row.

Expected behavior

The loading overlay should cover the entire rows area (the virtualized viewport) regardless of scroll position or the presence of pinned rows.

Context

When loading is used together with pinnedRows.top, the loading overlay only covers the initially visible data area. After scrolling the grid down, the bottom row (which slides out from under the overlay's boundary) remains uncovered — its content is visible past / through the dim layer.

It looks like the overlay computes its height/position once, accounting for the pinned row, and does not recalculate on scroll.

Image

Your environment

npx @mui/envinfo
@mui/x-data-grid-premium: 9.0.4
@mui/material: 9.0.0
react / react-dom: 18.2.0
Browser: Firefox 149.0.2
OS: Linux

Search keywords: overlay, loading, pinned row

Order ID: 115447

Metadata

Metadata

Assignees

Labels

feature: Rendering layoutRelated to the data grid Rendering enginescope: data gridChanges related to the data grid.support: premium standardSupport request from a Premium standard plan user. https://mui.com/legal/technical-support-sla.type: bugIt doesn't behave as expected.
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions