[data grid] apiRef.current.getRowId is not a function when using row spanning and row grouping together (we have support key for premium version). #16413
Labels
bug 🐛
Something doesn't work
component: data grid
This is the name of the generic UI component, not the React module!
feature: Row spanning
Related to the data grid Row spanning feature
Steps to reproduce
Cannot provide link to live example.
Can provide stack trace (I've added the relative paths manually):
Uncaught TypeError: apiRef.current.getRowId is not a function
at valueGetter (/hooks/features/rowGrouping/createGroupingColDef.js:233:36)
at getCellValue (/hooks/features/rows/gridRowSpanningUtils.js:39:17)
at /hooks/features/rows/useGridRowSpanning.js:44:25
at Array.forEach ()
at computeRowSpanningState (/hooks/features/rows/useGridRowSpanning.js:35:11)
at rowSpanningStateInitializer (/hooks/features/rows/useGridRowSpanning.js:157:9)
at useGridInitializeState (/hooks/utils/useGridInitializeState.js:5:35)
at useDataGridPremiumComponent (/DataGridPremium/useDataGridPremiumComponent.js:52:3)
at DataGridPremium (/DataGridPremium/DataGridPremium.js:29:25)
at renderWithHooks (react-dom.development.js:15486:18)
Current behavior
When I create a row spannable data grid (using
unstable_rowSpanning
) and then add a rowGrouping model into the intialState, one of the first function calls is to valueGetter, which then tries to get the row id usingapiRef.current.getRowId
, but this function is not defined, even if I add it as a prop to the main props of the data grid (getRowId
).Expected behavior
This should not error when using row spanning and row grouping.
Context
No response
Your environment
npx @mui/envinfo
Search keywords: getRowId not function row spanning grouping
The text was updated successfully, but these errors were encountered: