A
Alokai2y ago
espoge

SfComponentSelect dosen't hold selection

Hi there, i have problem with SfComponentSelect component
<SfComponentSelect
:selected="option.values[0].code"
:size="5"
class="mr-1"
:persistent="false" >
<SfComponentSelectOption
v-for="value in option.values"
:key="value.id"
:value="value.code"
>

{{ value.value }}

</SfComponentSelectOption>
</SfComponentSelect>
<SfComponentSelect
:selected="option.values[0].code"
:size="5"
class="mr-1"
:persistent="false" >
<SfComponentSelectOption
v-for="value in option.values"
:key="value.id"
:value="value.code"
>

{{ value.value }}

</SfComponentSelectOption>
</SfComponentSelect>
I'm using this code but when I select an option, dosen't hold the selection. I tried with a v-model as attibute of component but :selected attribute dosen't work. Any suggestion? Thanks
6 Replies
Yash
Yash2y ago
Are you using StorefrontUI 2?
espoge
espogeOP2y ago
yes
Yash
Yash2y ago
But I don't find any component named SfComponentSelect in StorefrontUI.
Yash
Yash2y ago
Oh, its in Storefront UI 1 and not in Storefront UI 2.
espoge
espogeOP2y ago
ok, I'm sorry but I think it works in the similar way I solved with a default value in my model
Want results from more Discord servers?
Add your server