Skip to content

Commit

Permalink
fix(UsaSelect): set selected prop correctly for ssr
Browse files Browse the repository at this point in the history
  • Loading branch information
patrickcate committed Nov 21, 2024
1 parent 1131950 commit 2556c07
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/components/UsaSelect/UsaSelect.vue
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ const groupElements = computed(
<option
v-if="!option.group"
:value="option.value"
:selected="option.value === selectedValue"
:disabled="option.disabled"
>{{ option.text || option.value }}</option
>
Expand All @@ -152,6 +153,7 @@ const groupElements = computed(
v-for="groupedOption in option.options"
:key="groupedOption.value"
:value="groupedOption.value"
:selected="groupedOption.value === selectedValue"
:disabled="groupedOption.disabled"
>{{ groupedOption.text || groupedOption.value }}</option
>
Expand Down

0 comments on commit 2556c07

Please sign in to comment.