Why Invalid prop: type check failed for prop "value". Expected String, Number, Object, Boolean, got Array shows for the program below mention?
html:
<model-select :options="usersAssignData" v-model="userNameData" class="form-control col-sm-4" @keyup.native="getUser" >
script:
getUser(e) {
console.log("idd",this.selectedZone)
var user = e.target.value;
axios.get("/helpdesk/getUsers", {
params: {
q: user,
account_id: this.selectedZone,
searchOption: 'username'
},
headers: {
'Authorization': localStorage.getItem('token')
}
})
.then(response => {
this.usersAssignData = response.data
})
.catch(error => {
reject(error);
console.log(error);
});
}
The type of the prop usersAssignData
of your component is probably not an Array, and the axios call it seems to be returning an Array. Try doing what @DharaParmar said, setting the type of the prop as an array.