-
-
Notifications
You must be signed in to change notification settings - Fork 8.8k
Closed
Labels
🔨 p3-minor-bugPriority 3: this fixes a bug, but is an edge case that only affects very specific usage.Priority 3: this fixes a bug, but is an edge case that only affects very specific usage.🐞 bugSomething isn't workingSomething isn't workinghas workaroundA workaround has been found to avoid the problemA workaround has been found to avoid the problemscope: compiler
Description
Vue version
3.2.38
Link to minimal reproduction
Steps to reproduce
I have a simple <select v-model="foo">
setup with 5 options and the values all set to numbers. When there are 4 options, the variable is set to a number type as expected. When there are 5 or more options, the variable is set to a string!
See the example link as a demo with two identical selects other than the number of options.
If you instead define an array and use v-for
to create your options, this bug does not appear and you can have 100 options and the value is always a number.
What is expected?
The v-model variable should always be a number and the number of options set shouldn't matter.
What is actually happening?
As soon as more than 4 explicit option tags are present you get a string as the value.
System Info
No response
Any additional comments?
No response
rasteiner
Metadata
Metadata
Assignees
Labels
🔨 p3-minor-bugPriority 3: this fixes a bug, but is an edge case that only affects very specific usage.Priority 3: this fixes a bug, but is an edge case that only affects very specific usage.🐞 bugSomething isn't workingSomething isn't workinghas workaroundA workaround has been found to avoid the problemA workaround has been found to avoid the problemscope: compiler