Skip to content

fix: avoid forwarding hideMenu to menu items#22955

Open
dejoski wants to merge 1 commit into
mui:masterfrom
dejoski:fix/issue-22909-export-menu-hide-menu-prop
Open

fix: avoid forwarding hideMenu to menu items#22955
dejoski wants to merge 1 commit into
mui:masterfrom
dejoski:fix/issue-22909-export-menu-hide-menu-prop

Conversation

@dejoski

@dejoski dejoski commented Jun 25, 2026

Copy link
Copy Markdown

Summary

  • avoid passing the internal hideMenu prop to direct menu item children in GridToolbarExportContainer
  • wrap direct Material UI/base menu item onClick handlers to close the export menu instead
  • add a regression test for a custom toolbar using a bare Material UI MenuItem

Closes #22909

Validation

  • git diff --check
  • npx pnpm@11.5.0 --version

Note: dependencies were not installed in this fresh local checkout, so I could not run the MUI X test suite locally before opening this PR.

Signed-off-by: Dejan Stajic <8886210+dejoski@users.noreply.github.com>
@code-infra-dashboard

Copy link
Copy Markdown

Deploy preview

https://deploy-preview-22955--material-ui-x.netlify.app/

Bundle size

Bundle Parsed size Gzip size
@mui/x-data-grid 🔺+176B(+0.04%) 🔺+57B(+0.05%)
@mui/x-data-grid-pro 🔺+176B(+0.03%) 🔺+57B(+0.04%)
@mui/x-data-grid-premium 🔺+176B(+0.02%) 🔺+63B(+0.03%)
@mui/x-charts 0B(0.00%) 0B(0.00%)
@mui/x-charts-pro 0B(0.00%) 0B(0.00%)
@mui/x-charts-premium 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers 0B(0.00%) 0B(0.00%)
@mui/x-date-pickers-pro 0B(0.00%) 0B(0.00%)
@mui/x-tree-view 0B(0.00%) 0B(0.00%)
@mui/x-tree-view-pro 0B(0.00%) 0B(0.00%)
@mui/x-license 0B(0.00%) 0B(0.00%)

Details of bundle changes


Check out the code infra dashboard for more information about this PR.

@zannager zannager added the scope: data grid Changes related to the data grid. label Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scope: data grid Changes related to the data grid.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[data grid] GridToolbarExportContainer leaks the injected hideMenu prop onto the DOM <li>, triggering a React 19 warning

2 participants