I have a dropdown in vue js.
<v-flex> <v-select label="Select Province" v-bind:items="listProvince" outline v-model="province" persistent-hint @change="loadCity()"></v-select>
</v-flex>
and in the 'listProvince' I am getting data and displayed in the dropdown but in console I am getting this error Invalid prop: type check failed for prop "items". Expected Array, got String.
This is the vue js code:
export default {
props: ["updateView","newBooking"],
data() {
return {
selected: [0],
shipper: "",
address: "",
barangay: "",
city: "",
province: "",
phone: "",
listProvince:"",
selectedCity:"",
bookingObject: {},
isNewBk: false,
};
}
}
Please help me thanks in advance
To complete the answer with an example... example from Vue site:
props: {
title: String,
likes: Number,
isPublished: Boolean,
commentIds: Array,
author: Object,
callback: Function,
contactsPromise: Promise // or any other constructor
}
for more info: https://v2.vuejs.org/v2/guide/components-props.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With