Skip to content

[data grid] fetchRows() API not working in lazy loading mode #21722

@ahmedBilal5

Description

@ahmedBilal5

Steps to reproduce

Steps:

  1. Open this link to live example. A data-grid-pro in lazy loading mode should load.
  2. Click the 'Fetch Manually' Button. A request is sent, but the grid does not seem to update.

Current behavior

apiRef.current?.dataSource.fetchRows() when called for a grid in lazyLoading mode sends a request but the
grid is not updated.

Note: This problem does not occur when using server side data with traditional pagination controls or with server side tree data

Moreover, for viewport loading, it seems that start and end parameters are always the same (the ones for the first set of rows that fill the viewport), regardless of scroll position.

Expected behavior

I think that start and end parameters should be according to the scroll position in viewport loading mode when apiRef.current?.dataSource.fetchRows() is called.

grid should update after fetch as in other modes.

Context

No response

Your environment

npx @mui/envinfo
  Don't forget to mention which browser you used.
  Output from `npx @mui/envinfo` goes here.

Search keywords: data-grid-pro lazy loading server side data

Order ID: 123695

Metadata

Metadata

Assignees

Labels

feature: Server integrationBetter integration with backends, e.g. data sourcescope: data gridChanges related to the data grid.support: pro standardSupport request from a Pro standard plan user. https://mui.com/legal/technical-support-sla.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions