Skip to content

[radio group] Fix disabled selected form submission#4926

Open
atomiks wants to merge 1 commit into
mui:masterfrom
atomiks:codex/radio-disabled-submit-value
Open

[radio group] Fix disabled selected form submission#4926
atomiks wants to merge 1 commit into
mui:masterfrom
atomiks:codex/radio-disabled-submit-value

Conversation

@atomiks
Copy link
Copy Markdown
Contributor

@atomiks atomiks commented May 27, 2026

Radio groups now match native form submission when the selected radio is disabled, and the indicator state type reflects the root state it already receives.

Changes

  • Return null from form values when the tracked selected radio is disabled.
  • Add Chromium coverage for radios disabled after mount and initially disabled.
  • Expose the full radio root state through Radio.Indicator.State docs and types.

Original findings addressed

  • [P1] Disabled selected radios were excluded from native FormData but still reported by onFormSubmit.
  • [P2] RadioIndicatorState only declared checked even though it receives root field state at runtime.

@atomiks atomiks added component: radio group Changes related to the radio group component. type: bug It doesn't behave as expected. labels May 27, 2026 — with ChatGPT Codex Connector
@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented May 27, 2026

commit: 3b7512f

@code-infra-dashboard
Copy link
Copy Markdown

code-infra-dashboard Bot commented May 27, 2026

Bundle size

Bundle Parsed size Gzip size
@base-ui/react 🔺+68B(+0.01%) 🔺+17B(+0.01%)

Details of bundle changes

Performance

Total duration: 1,325.67 ms -19.90 ms(-1.5%) | Renders: 50 (+0) | Paint: 2,000.82 ms -60.92 ms(-3.0%)

Test Duration Renders
Checkbox mount (500 instances) 106.99 ms 🔺+25.58 ms(+31.4%) 1 (+0)

11 tests within noise — details


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

@netlify
Copy link
Copy Markdown

netlify Bot commented May 27, 2026

Deploy Preview for base-ui ready!

Name Link
🔨 Latest commit 3b7512f
🔍 Latest deploy log https://app.netlify.com/projects/base-ui/deploys/6a16ccb2e93f020008949960
😎 Deploy Preview https://deploy-preview-4926--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 marked this pull request as ready for review May 28, 2026 09:28
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.

1 participant