Skip to content

Commit fbce730

Browse files
authored
Merge pull request #431 from ownego/fix-bug/wrong-checked-model-Radio-button-comp
Update: priority checked props when exist props checked
2 parents 9867c2a + 5628e89 commit fbce730

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/components/RadioButton/RadioButton.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Choice(
55
:id="`${id}`",
66
:label-class-name="styles.ChoiceLabel",
77
:fill="fill",
8-
:tone="model === normalizedValue ? tone : undefined",
8+
:tone="(checked ?? model === normalizedValue) ? tone : undefined",
99
v-bind="extraChoiceProps",
1010
)
1111
template(v-if="hasSlot(slots.label) || label", #label)
@@ -22,7 +22,7 @@ Choice(
2222
:name="`${name}`",
2323
:value="value",
2424
type="radio",
25-
:checked="checked || model === normalizedValue",
25+
:checked="checked ?? model === normalizedValue",
2626
:disabled="disabled",
2727
:class="inputClassName",
2828
:aria-describedby="ariaDescribedBy",

0 commit comments

Comments
 (0)