LWC Get Combobox Option from custom Object
The issue is here.
get eventOptions() {
return this.eventsList.data.values;
}
this.eventsList.data
is an array and does not have any values attribute.You can check the documentation, the array will be returned in data attribute You have to iterate over your eventList and create an array of options that can be used with Combobox.
Something like:
get eventOptions() {
var returnOptions = [];
if(this.eventsList.data){
this.eventsList.data.forEach(ele =>{
returnOptions.push({label:ele.Name , value:ele.Name});
});
}
console.log(JSON.stringify(returnOptions));
return returnOptions;
}