Skip to content

[6.x] Fix read-only/disabled states in Radio component#14621

Merged
jasonvarga merged 1 commit into6.xfrom
radio-states
May 7, 2026
Merged

[6.x] Fix read-only/disabled states in Radio component#14621
jasonvarga merged 1 commit into6.xfrom
radio-states

Conversation

@duncanmcclean
Copy link
Copy Markdown
Member

This pull request fixes the read-only and disabled states on the Radio component, aligning it with the Checkbox component's existing implementation.

Previously, the RadioFieldtype was passing :read-only="isReadOnly" to each Radio item, but the prop didn't exist on the component so it was silently ignored. This meant radio buttons remained interactive in read-only contexts. The disabled prop also wasn't being combined with read-only state like it is in the Checkbox component.

This PR fixes it by adding a readOnly prop to Radio/Item.vue and passing :disabled="readOnly || disabled" to reka-ui's RadioGroupItem, matching the pattern already used by Checkbox/Item.vue.

Before

CleanShot 2026-05-07 at 17 27 10

After

CleanShot 2026-05-07 at 17 26 56

@jasonvarga jasonvarga merged commit f92e17d into 6.x May 7, 2026
18 checks passed
@jasonvarga jasonvarga deleted the radio-states branch May 7, 2026 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants