[DataGridPro] unstable_dataSource Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'id') #15203
Labels
component: data grid
This is the name of the generic UI component, not the React module!
duplicate
This issue or pull request already exists
Steps to reproduce
Link to live example: (required)
Steps:
1.
2.
3.
Current behavior
Expected behavior
Showing the rows
Context
Here is my grid settings
I am using graphql in my grid and I want to have url navigation between grid pages so I started adding it custom while using server side using unstable_dataSource the issue I am having is only happening when i navigate with the browser back and forward button not always happening, but sometimes not sure if it's an async issue since its still unstable I get the error uploaded in the above picture, doesn't seems to happen when I use regular grid navigation button back and forward button on grid but since I want to allow url navigation by pressing back and forward on the browser it trigger the triggerGridFetch state change which will fetch data the data is fetched correctly even when it fails since it present in the logs but not sure if MUi tried to render it before it was available trying to access id of a null which ID is a mandatory field my data has.
useGridFocus.js:338 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'id') at Object.current (useGridFocus.js:338:29) at EventManager.enhancedHandler (useGridApiEventHandler.js:33:29) at EventManager.emit (EventManager.js:57:18) at Object.publishEvent (useGridApiInitialization.js:88:40) at run (useGridRows.js:91:22) at useGridRows.js:105:5 at Object.<anonymous> (useGridRows.js:121:5) at Object.fetchRows (useGridDataSource.js:73:22)
Your environment
npx @mui/envinfo
Search keywords: Cannot read properties of undefined (reading 'id')
The text was updated successfully, but these errors were encountered: