Can't set selected option just using ID #1649
Unanswered
jhob101
asked this question in
Help Wanted
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Describe the bug
I store the select option as just the id. When the select is initialised I want to set the selected item using just the id.
Here's a simplified version of the code, the production version is more complicated as it involves a pinia store, which is why I'm not using v-model.
Now I have found that I can do this, which achieves what I want:
But that feels like a bit of a hack.
I can't find a more generally supported way of doing this in the documentation. Am I missing something or does this feature not exist? If it doesn't exist then it seems like a bug as values would typically be stored as the id and so should be able to be set as just the id.
Beta Was this translation helpful? Give feedback.
All reactions