Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[DataGridPro] Implement Lazy loading #5214

Merged
merged 91 commits into from
Sep 1, 2022
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
Show all changes
91 commits
Select commit Hold shift + click to select a range
ad7e2da
add skeleton rows/cells
DanailH Jun 6, 2022
c214c93
Merge branch 'master' of github.com:mui/mui-x into feature/DataGridPr…
DanailH Jun 10, 2022
93af334
draft version ready
DanailH Jun 15, 2022
55948da
Merge branch 'master' of github.com:mui/mui-x into feature/DataGridPr…
DanailH Jun 15, 2022
bd6f534
revert docs update
DanailH Jun 15, 2022
8db28de
resolve conflcits
DanailH Jul 6, 2022
29eafb9
PR comments
DanailH Jul 6, 2022
cc4019f
fix statics
DanailH Jul 6, 2022
0fc1bfc
polish solution
DanailH Jul 6, 2022
2fe5b7a
fix tests
DanailH Jul 6, 2022
7da81c2
enable all tests
DanailH Jul 6, 2022
82796fa
enable assertions
DanailH Jul 7, 2022
dd901a2
fix tree data test
DanailH Jul 7, 2022
a5dfc0a
add tests and make the feature experimental
DanailH Jul 13, 2022
692f4f4
fix formatting and enable tests
DanailH Jul 13, 2022
9abed60
fix test
DanailH Jul 13, 2022
0be892f
Update docs/data/data-grid/rows/rows.md
DanailH Jul 13, 2022
f565260
Update docs/data/data-grid/rows/rows.md
DanailH Jul 13, 2022
4e66d70
test
DanailH Jul 13, 2022
0fa4d64
Merge branch 'feature/DataGridPro-lazy-loading' of github.com:DanailH…
DanailH Jul 13, 2022
67b2141
Update packages/grid/x-data-grid-pro/src/hooks/features/lazyLoader/us…
DanailH Jul 13, 2022
cdacca9
Update packages/grid/x-data-grid-pro/src/hooks/features/lazyLoader/us…
DanailH Jul 13, 2022
ac2b4d8
Update packages/grid/x-data-grid-pro/src/hooks/features/lazyLoader/us…
DanailH Jul 13, 2022
27d44f8
fixes
DanailH Jul 13, 2022
e4c3a68
Merge branch 'feature/DataGridPro-lazy-loading' of github.com:DanailH…
DanailH Jul 13, 2022
aa995b8
updated example
DanailH Jul 13, 2022
37f8117
work on tests
DanailH Jul 13, 2022
e53ca5b
resolve conficts
DanailH Jul 26, 2022
4038f5d
PR comments
DanailH Jul 26, 2022
f880252
fix apis
DanailH Jul 26, 2022
a61e86c
resolve conflicts
DanailH Aug 2, 2022
c4a9343
polish the demo
DanailH Aug 2, 2022
cd87b6c
remove uneeded oage
DanailH Aug 3, 2022
4a31d2f
fix docs wording
DanailH Aug 3, 2022
fa8114f
Update packages/grid/x-data-grid-pro/src/hooks/features/lazyLoader/us…
DanailH Aug 3, 2022
6dd928b
Update packages/grid/x-data-grid/src/utils/utils.ts
DanailH Aug 3, 2022
875bd0c
working
DanailH Aug 3, 2022
877a117
optimise code
DanailH Aug 3, 2022
3fc84ff
Update docs/data/data-grid/row-updates/row-updates.md
DanailH Aug 22, 2022
42e11ee
Update docs/data/data-grid/row-updates/row-updates.md
DanailH Aug 22, 2022
aac485f
Update docs/data/data-grid/row-updates/row-updates.md
DanailH Aug 22, 2022
8906b83
PR comments
DanailH Aug 22, 2022
6ef5dc1
resolve conflicts
DanailH Aug 22, 2022
9bd6a08
Update packages/grid/x-data-grid/src/hooks/features/rows/useGridRows.ts
DanailH Aug 22, 2022
9dab887
optimize update rows as per PR comments
DanailH Aug 22, 2022
5b946e3
Merge branch 'feature/DataGridPro-lazy-loading' of github.com:DanailH…
DanailH Aug 22, 2022
e2661ce
Update packages/grid/x-data-grid-pro/src/tests/lazyLoader.DataGridPro…
DanailH Aug 22, 2022
fedb8c5
Update packages/grid/x-data-grid-pro/src/tests/lazyLoader.DataGridPro…
DanailH Aug 22, 2022
26a42ed
work
DanailH Aug 22, 2022
f0c9393
Merge branch 'feature/DataGridPro-lazy-loading' of github.com:DanailH…
DanailH Aug 22, 2022
09ad985
Update docs/data/data-grid/row-updates/row-updates.md
DanailH Aug 22, 2022
ead9b2a
Update docs/data/data-grid/row-updates/row-updates.md
DanailH Aug 22, 2022
0139c01
move docs info
DanailH Aug 22, 2022
57f07c9
Merge branch 'feature/DataGridPro-lazy-loading' of github.com:DanailH…
DanailH Aug 22, 2022
d890470
resolve conflicts
DanailH Aug 22, 2022
5bd7d0d
fix build
DanailH Aug 22, 2022
801b443
fix liter
DanailH Aug 22, 2022
1f1074e
simplify skeletonRowId
DanailH Aug 22, 2022
acdcb76
Update packages/grid/x-data-grid/src/hooks/features/rows/useGridRows.ts
DanailH Aug 22, 2022
c8f46e9
Update packages/grid/x-data-grid-pro/src/hooks/features/lazyLoader/us…
DanailH Aug 22, 2022
f55e7fe
infer return types
DanailH Aug 22, 2022
e1a8044
Merge branch 'feature/DataGridPro-lazy-loading' of github.com:DanailH…
DanailH Aug 22, 2022
1d845d0
simplify skeleton row check
DanailH Aug 22, 2022
f0aeea7
Update docs/data/data-grid/row-updates/row-updates.md
DanailH Aug 23, 2022
dc4e50b
revert changes
DanailH Aug 23, 2022
90e1903
resolve conflicts
DanailH Aug 23, 2022
61be031
Update docs/data/data-grid/row-updates/row-updates.md
DanailH Aug 24, 2022
7d5e427
Update packages/grid/x-data-grid/src/models/params/gridRenderedRowsIn…
DanailH Aug 24, 2022
d6b536f
Update packages/grid/x-data-grid/src/models/params/gridRenderedRowsIn…
DanailH Aug 24, 2022
0adb7ef
PR comments
DanailH Aug 24, 2022
65e522b
Merge branch 'feature/DataGridPro-lazy-loading' of github.com:DanailH…
DanailH Aug 24, 2022
9a88194
resolve conflicts
DanailH Aug 24, 2022
2dafe3a
fix build
DanailH Aug 24, 2022
d781e29
Update packages/grid/x-data-grid-pro/src/models/gridFetchRowsParams.ts
DanailH Aug 24, 2022
4491fb4
Update packages/grid/x-data-grid-pro/src/models/gridFetchRowsParams.ts
DanailH Aug 24, 2022
6cf0cf9
Update packages/grid/x-data-grid-pro/src/tests/lazyLoader.DataGridPro…
DanailH Aug 24, 2022
39ad75f
Update packages/grid/x-data-grid/src/hooks/features/rows/useGridRows.ts
DanailH Aug 24, 2022
c563079
feedback
DanailH Aug 24, 2022
fa846a6
conflicts
DanailH Aug 24, 2022
f381442
update demo and fix sorting/filtering bug
DanailH Aug 24, 2022
924cf66
work
DanailH Aug 24, 2022
74200f4
add new test case
oliviertassinari Aug 24, 2022
7512a8f
simplify demo
oliviertassinari Aug 24, 2022
3d12945
update the loading rows count
DanailH Aug 25, 2022
69b0595
get latest
DanailH Aug 25, 2022
17def05
rework replaceRows method
DanailH Aug 25, 2022
79eb868
add emply rows check
DanailH Aug 25, 2022
88ea46f
rework how scrolling works after filtring or sorting
DanailH Aug 25, 2022
3724946
update docs
DanailH Aug 25, 2022
38be38d
add unstbale_ prefix and include debounce in the demo
DanailH Aug 31, 2022
5a7905e
remove console.log
DanailH Aug 31, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions docs/data/data-grid/events/events.json
Original file line number Diff line number Diff line change
Expand Up @@ -181,6 +181,13 @@
"params": "GridEditRowsModel",
"event": "MuiEvent<{}>"
},
{
"projects": ["x-data-grid-pro", "x-data-grid-premium"],
"name": "fetchRows",
"description": "Fired when a new batch of rows is requested to be loaded. Called with a GridFetchRowsParams object.",
"params": "GridFetchRowsParams",
"event": "MuiEvent<{}>"
},
{
"projects": ["x-data-grid", "x-data-grid-pro", "x-data-grid-premium"],
"name": "filterModelChange",
Expand Down Expand Up @@ -237,6 +244,13 @@
"params": "GridPreferencePanelParams",
"event": "MuiEvent<{}>"
},
{
"projects": ["x-data-grid", "x-data-grid-pro", "x-data-grid-premium"],
"name": "renderedRowsIntervalChange",
"description": "Fired when the rendered rows index interval changes. Called with a GridRenderedRowsIntervalChangeParams object.",
"params": "GridRenderedRowsIntervalChangeParams",
"event": "MuiEvent<{}>"
},
{
"projects": ["x-data-grid", "x-data-grid-pro", "x-data-grid-premium"],
"name": "resize",
Expand Down
59 changes: 59 additions & 0 deletions docs/data/data-grid/rows/LazyLoadingGrid.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import * as React from 'react';
import { DataGridPro, useGridApiRef } from '@mui/x-data-grid-pro';
import {
useDemoData,
getRealGridData,
getCommodityColumns,
} from '@mui/x-data-grid-generator';

async function sleep(duration) {
return new Promise((resolve) => {
setTimeout(() => {
resolve();
}, duration);
});
}

const loadServerRows = async (newRowLength) => {
const newData = await getRealGridData(newRowLength, getCommodityColumns());
// Simulate network throttle
await sleep(Math.random() * 100 + 100);

return newData.rows;
};

export default function LazyLoadingGrid() {
const apiRef = useGridApiRef();
const { data } = useDemoData({
dataSet: 'Commodity',
rowLength: 10,
maxColumns: 6,
});

const handleFetchRows = async (params) => {
const newRowsBatch = await loadServerRows(
params.lastRowToRender - params.firstRowToRender,
);

apiRef.current.replaceRows(
params.firstRowToRender,
params.lastRowToRender,
newRowsBatch,
);
};

return (
<div style={{ height: 400, width: '100%' }}>
<DataGridPro
{...data}
apiRef={apiRef}
hideFooterPagination
rowCount={50}
sortingMode="server"
filterMode="server"
rowsLoadingMode="server"
DanailH marked this conversation as resolved.
Show resolved Hide resolved
onFetchRows={handleFetchRows}
/>
</div>
);
}
63 changes: 63 additions & 0 deletions docs/data/data-grid/rows/LazyLoadingGrid.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
import * as React from 'react';
import {
GridFetchRowsParams,
DataGridPro,
useGridApiRef,
} from '@mui/x-data-grid-pro';
import {
useDemoData,
getRealGridData,
getCommodityColumns,
} from '@mui/x-data-grid-generator';

async function sleep(duration: number) {
return new Promise<void>((resolve) => {
setTimeout(() => {
resolve();
}, duration);
});
}

const loadServerRows = async (newRowLength: number) => {
const newData = await getRealGridData(newRowLength, getCommodityColumns());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe call getRealGridData only once, before the grid is loaded, then slice it here to get only the portion needed. This is to avoid replacing already loaded rows with different data.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried to use the fake server that @alexfauquette created but it didn't work in this case. The problem was that the hook triggers a rerender and that was not ideal. I spent some time to try and work around the problem but ultimately gave up on that approach.
It would have been nice if I was able to make it work because then the filtering and sorting would also work.

Regarding the "jump" - I investigated further and it's not really a jump. As far as I understand the issue is with the way the getRealGridData returns new data. If I just create some static arrays with IDs from 1 to 30 and load those on chunks then it works as expected.
I can try and load preload all the rows but then how do we react to filtering and sorting?

// Simulate network throttle
await sleep(Math.random() * 100 + 100);

return newData.rows;
};

export default function LazyLoadingGrid() {
const apiRef = useGridApiRef();
const { data } = useDemoData({
dataSet: 'Commodity',
rowLength: 10,
maxColumns: 6,
});

const handleFetchRows = async (params: GridFetchRowsParams) => {
const newRowsBatch = await loadServerRows(
params.lastRowToRender - params.firstRowToRender,
);

apiRef.current.replaceRows(
params.firstRowToRender,
params.lastRowToRender,
newRowsBatch,
);
};

return (
<div style={{ height: 400, width: '100%' }}>
<DataGridPro
{...data}
apiRef={apiRef}
hideFooterPagination
rowCount={50}
sortingMode="server"
filterMode="server"
rowsLoadingMode="server"
onFetchRows={handleFetchRows}
/>
</div>
);
}
10 changes: 10 additions & 0 deletions docs/data/data-grid/rows/LazyLoadingGrid.tsx.preview
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<DataGridPro
{...data}
apiRef={apiRef}
hideFooterPagination
rowCount={50}
sortingMode="server"
filterMode="server"
rowsLoadingMode="server"
onFetchRows={handleFetchRows}
/>
16 changes: 16 additions & 0 deletions docs/data/data-grid/rows/rows.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ The following demo shows how to use `getRowId` to grab the unique identifier fro
<DataGrid getRowId={(row) => row.internalId} />
```

:::

DanailH marked this conversation as resolved.
Show resolved Hide resolved
{{"demo": "RowsGridWithGetRowId.js", "bg": "inline", "defaultCodeOpen": false}}

If no such unique identifier exists in the data set, then you must create it by some other means, but this scenario should be avoided because it leads to issues with other features of the grid.
Expand Down Expand Up @@ -80,6 +82,20 @@ In addition, the area in which `onRowsScrollEnd` is called can be changed using

{{"demo": "InfiniteLoadingGrid.js", "bg": "inline", "disableAd": true}}

### Lazy loading [<span class="plan-pro"></span>](https://mui.com/store/items/mui-x-pro/)

To allow the grid to lazy load data, set `rowsLoadingMode="server"`.
Then the `rowCount` needs to be set and the number of initially loaded rows needs to be less than the `rowCount` value.
DanailH marked this conversation as resolved.
Show resolved Hide resolved
In addition, you need to handle the `onFetchRows` callback to fetch the rows for the corresponding index.
Finally, you need to use the `apiRef.current.insertRows()` to tell the DataGrid where to insert the newly fetched rows.

:::info
In order for the filtering and sorting to work you need to set their modes to `server`.
You can find out more information about how to do that on the [server-side filter page](/components/data-grid/filtering/#server-side-filter) and on the [server-side sorting page](/components/data-grid/sorting/#server-side-sorting).
:::

{{"demo": "LazyLoadingGrid.js", "bg": "inline", "disableAd": true}}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After reading this section and the demo, I'm wondering how often the onFetchRows is called and should I handle by myself to do not call the server if I already have all the rows

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If all the rows are loaded the onFetchRows won't be called.
One optimization that is needed by the user is to implement throttle because now this callback is being called a lot while scrolling.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems to fetch for each row that becomes visible in the viewport. In practice, it's probably not usable in production in the current shape as it would flood the server API.


### High frequency [<span class="plan-pro"></span>](https://mui.com/store/items/mui-x-pro/)

Whenever the rows are updated, the grid has to apply the sorting and filters. This can be a problem if you have high frequency updates. To maintain good performances, the grid allows to batch the updates and only apply them after a period of time. The `throttleRowsMs` prop can be used to define the frequency (in milliseconds) at which rows updates are applied.
Expand Down
4 changes: 4 additions & 0 deletions docs/pages/x/api/data-grid/data-grid-premium.json
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,7 @@
},
"onEditRowsModelChange": { "type": { "name": "func" } },
"onError": { "type": { "name": "func" } },
"onFetchRows": { "type": { "name": "func" } },
"onFilterModelChange": { "type": { "name": "func" } },
"onMenuClose": { "type": { "name": "func" } },
"onMenuOpen": { "type": { "name": "func" } },
Expand Down Expand Up @@ -189,6 +190,9 @@
"rowHeight": { "type": { "name": "number" }, "default": "52" },
"rowModesModel": { "type": { "name": "object" } },
"rowReordering": { "type": { "name": "bool" } },
"rowsLoadingMode": {
"type": { "name": "enum", "description": "'client'<br>&#124;&nbsp;'server'" }
},
"rowSpacingType": {
"type": { "name": "enum", "description": "'border'<br>&#124;&nbsp;'margin'" },
"default": "\"margin\""
Expand Down
5 changes: 5 additions & 0 deletions docs/pages/x/api/data-grid/data-grid-pro.json
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@
},
"onEditRowsModelChange": { "type": { "name": "func" } },
"onError": { "type": { "name": "func" } },
"onFetchRows": { "type": { "name": "func" } },
"onFilterModelChange": { "type": { "name": "func" } },
"onMenuClose": { "type": { "name": "func" } },
"onMenuOpen": { "type": { "name": "func" } },
Expand Down Expand Up @@ -182,6 +183,9 @@
"rowHeight": { "type": { "name": "number" }, "default": "52" },
"rowModesModel": { "type": { "name": "object" } },
"rowReordering": { "type": { "name": "bool" } },
"rowsLoadingMode": {
"type": { "name": "enum", "description": "'client'<br>&#124;&nbsp;'server'" }
},
"rowSpacingType": {
"type": { "name": "enum", "description": "'border'<br>&#124;&nbsp;'margin'" },
"default": "\"margin\""
Expand Down Expand Up @@ -295,6 +299,7 @@
"QuickFilterIcon": { "default": "GridSearchIcon", "type": { "name": "elementType" } },
"Row": { "default": "GridRow", "type": { "name": "elementType" } },
"RowReorderIcon": { "default": "GridDragIcon", "type": { "name": "elementType" } },
"SkeletonCell": { "default": "GridSkeletonCell", "type": { "name": "elementType" } },
"Toolbar": { "default": "null", "type": { "name": "elementType | null" } },
"TreeDataCollapseIcon": { "default": "GridExpandMoreIcon", "type": { "name": "elementType" } },
"TreeDataExpandIcon": { "default": "GridKeyboardArrowRight", "type": { "name": "elementType" } }
Expand Down
1 change: 1 addition & 0 deletions docs/pages/x/api/data-grid/data-grid.json
Original file line number Diff line number Diff line change
Expand Up @@ -250,6 +250,7 @@
"QuickFilterIcon": { "default": "GridSearchIcon", "type": { "name": "elementType" } },
"Row": { "default": "GridRow", "type": { "name": "elementType" } },
"RowReorderIcon": { "default": "GridDragIcon", "type": { "name": "elementType" } },
"SkeletonCell": { "default": "GridSkeletonCell", "type": { "name": "elementType" } },
"Toolbar": { "default": "null", "type": { "name": "elementType | null" } },
"TreeDataCollapseIcon": { "default": "GridExpandMoreIcon", "type": { "name": "elementType" } },
"TreeDataExpandIcon": { "default": "GridKeyboardArrowRight", "type": { "name": "elementType" } }
Expand Down
1 change: 1 addition & 0 deletions docs/pages/x/api/data-grid/grid-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ import { GridApi } from '@mui/x-data-grid-pro';
| <span class="prop-name">pinColumn [<span class="plan-pro" title="Pro plan"></span>](https://mui.com/store/items/mui-x-pro/)</span> | <span class="prop-type">(field: string, side: GridPinnedPosition) =&gt; void</span> | Pins a column to the left or right side of the grid. |
| <span class="prop-name">publishEvent</span> | <span class="prop-type">GridEventPublisher</span> | Emits an event. |
| <span class="prop-name">removeRowGroupingCriteria [<span class="plan-premium" title="Premium plan"></span>](https://mui.com/store/items/material-ui-premium/)</span> | <span class="prop-type">(groupingCriteriaField: string) =&gt; void</span> | Remove the field from the row grouping model. |
| <span class="prop-name">replaceRows</span> | <span class="prop-type">(firstRowToReplace: number, lastRowToReplace: number, newRows: GridRowModel[]) =&gt; void</span> | Replace a set of rows with new rows. |
| <span class="prop-name">resize</span> | <span class="prop-type">() =&gt; void</span> | Triggers a resize of the component and recalculation of width and height. |
| <span class="prop-name">restoreState</span> | <span class="prop-type">(stateToRestore: InitialState) =&gt; void</span> | Inject the given values into the state of the DataGrid. |
| <span class="prop-name">scroll</span> | <span class="prop-type">(params: Partial&lt;GridScrollParams&gt;) =&gt; void</span> | Triggers the viewport to scroll to the given positions (in pixels). |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
"onEditCellPropsChange": "Callback fired when the edit cell value changes.<br><br><strong>Signature:</strong><br><code>function(params: GridEditCellPropsParams, event: MuiEvent&lt;React.SyntheticEvent&gt;, details: GridCallbackDetails) =&gt; void</code><br><em>params:</em> With all properties from GridEditCellPropsParams.<br><em>event:</em> The event that caused this prop to be called.<br><em>details:</em> Additional details for this callback.",
"onEditRowsModelChange": "Callback fired when the <code>editRowsModel</code> changes.<br><br><strong>Signature:</strong><br><code>function(editRowsModel: GridEditRowsModel, details: GridCallbackDetails) =&gt; void</code><br><em>editRowsModel:</em> With all properties from GridEditRowsModel.<br><em>details:</em> Additional details for this callback.",
"onError": "Callback fired when an exception is thrown in the grid.<br><br><strong>Signature:</strong><br><code>function(args: any, event: MuiEvent&lt;{}&gt;, details: GridCallbackDetails) =&gt; void</code><br><em>args:</em> The arguments passed to the <code>showError</code> call.<br><em>event:</em> The event object.<br><em>details:</em> Additional details for this callback.",
"onFetchRows": "Callback fired when rowCount is set and the next batch of virtualized rows is rendered.<br><br><strong>Signature:</strong><br><code>function(params: GridFetchRowsParams, event: MuiEvent&lt;{}&gt;, details: GridCallbackDetails) =&gt; void</code><br><em>params:</em> With all properties from GridFetchRowsParams.<br><em>event:</em> The event object.<br><em>details:</em> Additional details for this callback.",
"onFilterModelChange": "Callback fired when the Filter model changes before the filters are applied.<br><br><strong>Signature:</strong><br><code>function(model: GridFilterModel, details: GridCallbackDetails) =&gt; void</code><br><em>model:</em> With all properties from <a href=\"/x/api/data-grid/grid-filter-model/\">GridFilterModel</a>.<br><em>details:</em> Additional details for this callback.",
"onMenuClose": "Callback fired when the menu is closed.<br><br><strong>Signature:</strong><br><code>function(params: GridMenuParams, event: MuiEvent&lt;{}&gt;, details: GridCallbackDetails) =&gt; void</code><br><em>params:</em> With all properties from GridMenuParams.<br><em>event:</em> The event object.<br><em>details:</em> Additional details for this callback.",
"onMenuOpen": "Callback fired when the menu is opened.<br><br><strong>Signature:</strong><br><code>function(params: GridMenuParams, event: MuiEvent&lt;{}&gt;, details: GridCallbackDetails) =&gt; void</code><br><em>params:</em> With all properties from GridMenuParams.<br><em>event:</em> The event object.<br><em>details:</em> Additional details for this callback.",
Expand Down Expand Up @@ -126,6 +127,7 @@
"rowModesModel": "Controls the modes of the rows.",
"rowReordering": "If <code>true</code>, the reordering of rows is enabled.",
"rows": "Set of rows of type GridRowsProp.",
"rowsLoadingMode": "Loading rows can be processed on the server or client-side. Set it to &#39;client&#39; if you would like to handle the infnite loading on the client-side. Set it to &#39;server&#39; if you would like to handle the infnite loading on the server-side. * @default &quot;client&quot;",
"rowSpacingType": "Sets the type of space between rows added by <code>getRowSpacing</code>.",
"rowsPerPageOptions": "Select the pageSize dynamically using the component UI.",
"rowThreshold": "Number of rows from the <code>rowBuffer</code> that can be visible before a new slice is rendered.",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@
"onEditCellPropsChange": "Callback fired when the edit cell value changes.<br><br><strong>Signature:</strong><br><code>function(params: GridEditCellPropsParams, event: MuiEvent&lt;React.SyntheticEvent&gt;, details: GridCallbackDetails) =&gt; void</code><br><em>params:</em> With all properties from GridEditCellPropsParams.<br><em>event:</em> The event that caused this prop to be called.<br><em>details:</em> Additional details for this callback.",
"onEditRowsModelChange": "Callback fired when the <code>editRowsModel</code> changes.<br><br><strong>Signature:</strong><br><code>function(editRowsModel: GridEditRowsModel, details: GridCallbackDetails) =&gt; void</code><br><em>editRowsModel:</em> With all properties from GridEditRowsModel.<br><em>details:</em> Additional details for this callback.",
"onError": "Callback fired when an exception is thrown in the grid.<br><br><strong>Signature:</strong><br><code>function(args: any, event: MuiEvent&lt;{}&gt;, details: GridCallbackDetails) =&gt; void</code><br><em>args:</em> The arguments passed to the <code>showError</code> call.<br><em>event:</em> The event object.<br><em>details:</em> Additional details for this callback.",
"onFetchRows": "Callback fired when rowCount is set and the next batch of virtualized rows is rendered.<br><br><strong>Signature:</strong><br><code>function(params: GridFetchRowsParams, event: MuiEvent&lt;{}&gt;, details: GridCallbackDetails) =&gt; void</code><br><em>params:</em> With all properties from GridFetchRowsParams.<br><em>event:</em> The event object.<br><em>details:</em> Additional details for this callback.",
"onFilterModelChange": "Callback fired when the Filter model changes before the filters are applied.<br><br><strong>Signature:</strong><br><code>function(model: GridFilterModel, details: GridCallbackDetails) =&gt; void</code><br><em>model:</em> With all properties from <a href=\"/x/api/data-grid/grid-filter-model/\">GridFilterModel</a>.<br><em>details:</em> Additional details for this callback.",
"onMenuClose": "Callback fired when the menu is closed.<br><br><strong>Signature:</strong><br><code>function(params: GridMenuParams, event: MuiEvent&lt;{}&gt;, details: GridCallbackDetails) =&gt; void</code><br><em>params:</em> With all properties from GridMenuParams.<br><em>event:</em> The event object.<br><em>details:</em> Additional details for this callback.",
"onMenuOpen": "Callback fired when the menu is opened.<br><br><strong>Signature:</strong><br><code>function(params: GridMenuParams, event: MuiEvent&lt;{}&gt;, details: GridCallbackDetails) =&gt; void</code><br><em>params:</em> With all properties from GridMenuParams.<br><em>event:</em> The event object.<br><em>details:</em> Additional details for this callback.",
Expand Down Expand Up @@ -126,6 +127,7 @@
"rowModesModel": "Controls the modes of the rows.",
"rowReordering": "If <code>true</code>, the reordering of rows is enabled.",
"rows": "Set of rows of type GridRowsProp.",
"rowsLoadingMode": "Loading rows can be processed on the server or client-side. Set it to &#39;client&#39; if you would like to handle the infnite loading on the client-side. Set it to &#39;server&#39; if you would like to handle the infnite loading on the server-side. * @default &quot;client&quot;",
"rowSpacingType": "Sets the type of space between rows added by <code>getRowSpacing</code>.",
"rowsPerPageOptions": "Select the pageSize dynamically using the component UI.",
"rowThreshold": "Number of rows from the <code>rowBuffer</code> that can be visible before a new slice is rendered.",
Expand Down
Loading