Hello everyone i have a bit of a problem trying to get v-model to work on a custom component i've created. The problem is that this component consists of two inputs, and each time these are changed i emit the "input" event and bind it to an array i have on the parent.
<key-value-input v-for="n in inputs" v-model="provider.params"></key-value-input>
Then in the Component itself...
updateData() {
this.$emit('input', {
key: this.inputData.key,
value: this.inputData.value
})
}
This kinda works the problem is that it replaces provider.params from the original empty array into an object containing only one of the several key-value combinations i might have since this component can be duplicated at runtime...
So the question is, how do i make it so that v-model can fetch the data from each sub-component and simply set it as objects in an array on the parent?