Skip to content

[menu][popover] Do not pass key to the rendered element - #3255

Merged
michaldudak merged 2 commits into
mui:masterfrom
michaldudak:key-spread-warning
Nov 18, 2025
Merged

michaldudak merged 2 commits into
mui:masterfrom
michaldudak:key-spread-warning

Conversation

@michaldudak

@michaldudak michaldudak commented Nov 18, 2025 •

Copy link
Copy Markdown
Member

Avoids adding the key prop to the rendered element as it causes problems with function form of the render prop. Because key is in props, spreading the props on the rendered element triggers a React warning.

Fixes #3248

@michaldudak michaldudak added component: menu Changes related to the menu component. type: regression A bug, but worse, it used to behave as expected. component: popover Changes related to the popover component. labels Nov 18, 2025
@pkg-pr-new

pkg-pr-new Bot commented Nov 18, 2025 •

Copy link
Copy Markdown

vite-css-base-ui-example

pnpm add https://pkg.pr.new/mui/base-ui/@base-ui-components/react@3255
pnpm add https://pkg.pr.new/mui/base-ui/@base-ui-components/utils@3255

commit: e9f8ef5

@mui-bot

mui-bot commented Nov 18, 2025 •

Copy link
Copy Markdown

Bundle size report

Bundle Parsed size Gzip size
@base-ui-components/react 🔺+96B(+0.02%) 🔺+4B(0.00%)

Details of bundle changes


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

@netlify

netlify Bot commented Nov 18, 2025 •

Copy link
Copy Markdown

✅ Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit e9f8ef5
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/691c4aad293a5b00087c3909
😎 Deploy Preview https://deploy-preview-3255--base-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@atomiks

atomiks commented Nov 18, 2025

Copy link
Copy Markdown
Contributor

IIRC you changed the tests just to silence the warning earlier, let's revert that so it also confirms there's no warning for public use

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: menu Changes related to the menu component. component: popover Changes related to the popover component. type: regression A bug, but worse, it used to behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[menu][popover] key prop in render prop callback causes React warning

3 participants