Steps to reproduce
Steps:
- Open this link to live example: https://codesandbox.io/p/sandbox/elastic-andras-7l3hgt
- Open the CodeSandbox console.
- Click one of the top-level options (e.g., 'Grid').
Current behavior
handleSelectedItemsChange is fired twice, once with an id parameter of 'grid' and once with an id parameter of ['grid'].
Expected behavior
handleSelectedItemsChange is only fired once. It's only fired with a scalar id parameter, since multiSelect is false.
Context
This behavior appears to be new in 9.x.
Your environment
npx @mui/envinfo
System:
OS: macOS 26.4.1
Binaries:
Node: 24.14.0 - /Users/josh/.nvm/versions/node/v24.14.0/bin/node
npm: 11.9.0 - /Users/josh/.nvm/versions/node/v24.14.0/bin/npm
pnpm: Not Found
Browsers:
Chrome: 147.0.7727.103
Edge: 147.0.3912.86
Firefox: 149.0.2
Safari: 26.4
npmPackages:
@base-ui/utils: 0.2.8
@emotion/react: 11.14.0
@emotion/styled: 11.14.1
@mui/core-downloads-tracker: 9.0.0
@mui/icons-material: 9.0.0
@mui/lab: 9.0.0-beta.2
@mui/material: 9.0.0
@mui/private-theming: 9.0.0
@mui/styled-engine: 9.0.0
@mui/system: 9.0.0
@mui/types: 9.0.0
@mui/utils: 9.0.0
@mui/x-date-pickers: 9.0.2
@mui/x-internals: 9.0.0
@mui/x-tree-view: 9.0.2
@types/react: ^18.3.27 => 18.3.27
react: ^18.3.1 => 18.3.1
react-dom: ^18.3.1 => 18.3.1
typescript: ^6.0.3 => 6.0.3
Search keywords: onSelectedItemsChange
Steps to reproduce
Steps:
Current behavior
handleSelectedItemsChangeis fired twice, once with an id parameter of'grid'and once with an id parameter of['grid'].Expected behavior
handleSelectedItemsChangeis only fired once. It's only fired with a scalar id parameter, sincemultiSelectis false.Context
This behavior appears to be new in 9.x.
Your environment
npx @mui/envinfoSearch keywords: onSelectedItemsChange