In the below code I have a value and that is an object how to can I push to the exist array.
methods: {
onChange(event) {
this.newItems.push(event.target.value);
console.log(event.target.value);
}
}
and my blade is:
<select @change='onChange($event)' class="form-control">
<option value="" selected disabled>Choose</option>
<option v-for='item,key in items' :value="item">@{{ item.name }}</option>
</select>
v-foris foritemswhile in the code you refer tothis.newItems, is it on purpose?