Skip to content

[radio group] Correct inputRef forwarding and cleanup - #5775

Merged
atomiks merged 2 commits into
mui:masterfrom
lyzno1:codex/fix-radio-group-input-ref-lifecycle
Sep 23, 2026
Merged

atomiks merged 2 commits into
mui:masterfrom
lyzno1:codex/fix-radio-group-input-ref-lifecycle

Conversation

@lyzno1

@lyzno1 lyzno1 commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

RadioGroup forwards inputRef to a radio input, but replacing the ref leaves the old ref attached and the new one unset. Callback cleanup can also be lost when the forwarded input changes or unmounts.

Keep the public ref synchronized with the current input and clean up each previous binding, including radios that start disabled and are later enabled.

@lyzno1 lyzno1 changed the title fix: [radio group] Correct inputRef forwarding and cleanup [radio group] Correct inputRef forwarding and cleanup Sep 22, 2026
@pkg-pr-new

pkg-pr-new Bot commented Sep 22, 2026 •

Copy link
Copy Markdown
  • base-ui-tanstack-start

  • vite-css-base-ui-example

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

commit: a64995e

@code-infra-dashboard

code-infra-dashboard Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

Bundle size

Bundle Parsed size Gzip size
@base-ui/react ▼-2B(0.00%) 0B(0.00%)

Details of bundle changes

Performance

Total duration: 1,118.98 ms -242.10 ms(-17.8%) | Renders: 76 (+0) | Paint: 1,864.74 ms -359.84 ms(-16.2%)

Test Duration Renders
Tabs mount (200 instances) 216.25 ms ▼-55.01 ms(-20.3%) 3 (+0)
Slider mount (300 instances) 90.62 ms ▼-33.84 ms(-27.2%) 2 (+0)
Menu open (500 items) 77.76 ms ▼-21.19 ms(-21.4%) 11 (+0)
Menu mount (300 instances) 77.47 ms ▼-20.30 ms(-20.8%) 1 (+0)
Tooltip mount (300 contained roots) 50.14 ms ▼-19.05 ms(-27.5%) 1 (+0)

…and 2 more (+8 within noise) — details


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

@netlify

netlify Bot commented Sep 22, 2026 •

Copy link
Copy Markdown

✅ Deploy Preview for base-ui ready!

Built without sensitive environment variables

Name Link
🔨 Latest commit a64995e
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/6ab338ca22ae150008002de4
😎 Deploy Preview https://deploy-preview-5775--base-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.
🤖 Make changes Run an agent on this branch

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

@atomiks atomiks added type: bug It doesn't behave as expected. component: radio group Changes related to the radio group component. labels Sep 23, 2026
@atomiks
atomiks merged commit 52c3814 into mui:master Sep 23, 2026
25 of 26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component: radio group Changes related to the radio group component. type: bug It doesn't behave as expected.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants