I'm updating a resource list based on a changing select element by setting this.calendarOptions.resources
and I'm also using a function to get events.
When I combine these things, the resources are displayed and the events seem to be fetched, but they are not displayed in the timeline. I have also tried calendarAPI.refetchEvents()
after updating the resources to see if that makes any difference. The events are fetched, but are not displayed still.
If I fix the resources without updating it, the calendar events are displayed successfully.
Any thoughts why this might occur greatly appreciated.
calendarOptions: {
resources: [],
events: this.getEvents
...
}
getEvents:
async getEvents(info) {
try {
const response = await this.$http.get(myurl)
return response.data.bookings
} catch (e) {
console.log(e)
}
}
getResources:
async getResources() {
try {
const response = await this.$http.get(myresourceurl)
this.calendarOptions.resources = response.data.resources
} catch (e) {
console.log(e)
}
}
111
Apologies. Turns out the API for resources was returning "resourceId" instead of "id"