Skip to content

Commit

Permalink
[DataGrid] Fix for error thrown when removing skeleton rows, after so…
Browse files Browse the repository at this point in the history
…rting is applied (#10807)
  • Loading branch information
benjaminbialy authored Nov 7, 2023
1 parent 129709a commit a3611e5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -440,7 +440,7 @@ export const useGridRows = (
tree[GRID_ROOT_GROUP_ID] = { ...rootGroup, children: rootGroupChildren };

// Removes potential remaining skeleton rows from the dataRowIds.
const dataRowIds = rootGroupChildren.filter((childId) => tree[childId].type === 'leaf');
const dataRowIds = rootGroupChildren.filter((childId) => tree[childId]?.type === 'leaf');

apiRef.current.caches.rows.dataRowIdToModelLookup = dataRowIdToModelLookup;
apiRef.current.caches.rows.dataRowIdToIdLookup = dataRowIdToIdLookup;
Expand Down

0 comments on commit a3611e5

Please sign in to comment.