[data grid] onRowSelectionModelChange
firing twice
#15079
Labels
bug 🐛
Something doesn't work
component: data grid
This is the name of the generic UI component, not the React module!
feature: Selection
Related to the data grid Selection feature
Search keywords
onRowSelectionModelChange
Latest version
Affected products
Data Grid
Steps to reproduce
Link to live example: (required)
https://codesandbox.io/p/sandbox/headless-microservice-x38xc6
Steps:
Current behavior
The
onRowSelectionModelChange
handler is triggered twice when trying to update any state within the handler, ifgetRowId
is used to set the unique row ID andfilterMode
is set to 'server'. However, whenfilterMode
is set to 'client', the handler is only triggered once.Expected behavior
onRowSelectionModelChange
should be triggered only once.Context
The response data doesn't include an id field but uses a different key as the record identifier. I am using getRowId to assign the id field.
Your environment
System:
OS: Linux 6.8 Ubuntu 22.04.5 LTS 22.04.5 LTS (Jammy Jellyfish)
Binaries:
Node: 22.1.0 - ~/.nvm/versions/node/v22.1.0/bin/node
npm: 10.7.0 - ~/.nvm/versions/node/v22.1.0/bin/npm
pnpm: Not Found
Browsers:
Chrome: 130.0.6723.58
npmPackages:
@emotion/react: ^11.13.3 => 11.13.3
@emotion/styled: ^11.13.0 => 11.13.0
@mui/core-downloads-tracker: 6.1.5
@mui/material: ^6.1.5 => 6.1.5
@mui/private-theming: 6.1.5
@mui/styled-engine: 6.1.5
@mui/system: 6.1.5
@mui/types: 7.2.18
@mui/utils: 6.1.5
@mui/x-data-grid: ^7.21.0 => 7.21.0
@mui/x-internals: 7.21.0
@types/react: ^18.3.10 => 18.3.10
react: ^18.3.1 => 18.3.1
react-dom: ^18.3.1 => 18.3.1
typescript: ^4.9.5 => 4.9.5
Order ID or Support key 💳 (optional)
No response
The text was updated successfully, but these errors were encountered: