v-selectpage
v-selectpage copied to clipboard
v-model is not updating the value
Bug
The v-model didn't work the value would disappear after I click on the option, I tried so many things with no success here is an example https://codesandbox.io/s/heuristic-cookies-q48ez9
Solution
After banging my head against the wall I discovered that the data should not be computed value
I was doing
<v-selectpage
v-model="selectedClientId"
:data="options.map(el => ({
name: el.name,
id: String(el.id)
}))"
placeholder=" "
title=" "
/>
I should do
<v-selectpage
v-model="selectedClientId"
:data="options"
key-field="id"
show-field="name"
placeholder=" "
title=" "
/>
In your examples case, only need to remove .map(...) content
<v-selectpage
v-model="selectedClientId"
:data="options"
placeholder=" "
title=" "
>
</v-selectpage>