v-model does not work with arrays #10568
Unanswered
fernandoelantana
asked this question in
Help/Questions
Replies: 1 comment
-
Under existing functionalities, if you want to pass components, you may need to use ref. const myArray=ref<any []>([]) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
}Hello,
I have a component with a prop that expects an array.
and my parent component looks like this:
When I emit the event "update:modelValue" the expected behaviour is to have the underlying ref to be updated with the contents. But instead is setting the whole array as a whole:
myArray = emited array
I would like v-model to behave like this:
How can I handle this using a directive?
Thank you
Beta Was this translation helpful? Give feedback.
All reactions