fix(RadioGroup): pass option.disabled to children

Fixes #1109
This commit is contained in:
Benjamin Canac
2023-12-16 00:12:40 +01:00
parent 0fdc8f70b6
commit 0c8ab9d98e
2 changed files with 3 additions and 3 deletions

View File

@@ -60,7 +60,7 @@ Use the `disabled` prop to disable the RadioGroup.
::component-card
---
baseProps:
options: [{ value: 'email', label: 'Email' }, { value: 'sms', label: 'Phone (SMS)' }, { value: 'push', label: 'Push notification' }]
options: [{ value: 'email', label: 'Email' }, { value: 'sms', label: 'Phone (SMS)' }, { value: 'push', label: 'Push notification', disabled: true }]
modelValue: 'sms'
props:
disabled: true
@@ -68,7 +68,7 @@ props:
::
::callout{icon="i-heroicons-light-bulb"}
This prop also work on the Radio component.
This prop also work on the Radio component and you can set the `disabled` field in the `options` to disable a specific Radio.
::
### Label

View File

@@ -12,7 +12,7 @@
:label="option.label"
:model-value="modelValue"
:value="option.value"
:disabled="disabled"
:disabled="option.disabled || disabled"
:ui="uiRadio"
@change="onUpdate(option.value)"
>