Within the code snippet below, I am dealing with an object value and trying to figure out how to push it to an existing array.
methods: {
onChange(event) {
this.newItems.push(event.target.value);
console.log(event.target.value);
}
}
Here is my blade template:
<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>