[data grid] TypeError: Cannot read properties of undefined (reading 'id') #15800
Labels
bug 🐛
Something doesn't work
component: data grid
This is the name of the generic UI component, not the React module!
Steps to reproduce
Steps:
In my case I update my redux slice which makes the useMemo to recalculate the rows variable
Current behavior
when deleting the last item from the array, the datagrid throws the TypeError: Cannot read properties of undefined (reading 'id') error when an empty array is passed as the row props.
Expected behavior
There are no issues when removing items while the rows array still have items on it. It should work too for the case every items is removed from the row array.
Context
Listing files in data grid and a column has a control to delete the file from the grid.
Your environment
"@mui/x-data-grid": "^7.22.0",
Search keywords: Datagrid
The text was updated successfully, but these errors were encountered: