Hi There,
I'm using the syncfusion scheduler with the MS graph API. All is working fine when i make a request to the Graph api and get the events and them show the scheduler. When I add new data in the datasource array the datasource in the scheduler won't update. is there a way to make the datasource reactive or force an u
Hi Frank,
Greetings from Syncfusion support.
We have checked on your query and suggest you get the instance of the scheduler and update the Schedule dataSource or use the refreshEvents method to overcome the reported scenario.
Kindly let us know if you need further assistance.
Regards,
Ruksar Moosa Sait
Hi Ruksar,
thanks for the reply. I've tried what you've said. Currently I'm using the reshreshEvents method:
this.$refs.ScheduleObj.refreshEvents();
When i log it out it seems a function, but somehow it never refreshes my events. The only working way currently is to set a key on my schedule obj en force a reload. Can you help me what i'm doing wrong?
Hi Frank,
We have prepared a sample to manually refresh the scheduler data source on a button click by adding a new appointment to the Schedule data source and updating it to the dataSource like the below code.
[App.Vue]
|
methods: { btnClick: function() { let additionalData = [ { Id: 500, Subject: 'New Appointment', StartTime: new Date(2022, 1, 14, 10, 0), EndTime: new Date(2022, 1, 14, 12, 30), }, ]; this.eventSettings = { dataSource: data.concat(additionalData) } } } |
Output:
Kindly try the above solution and if the issue persists, could you please get back to us with the below additional details that help us to validate the issue further and provide the solution earlier?
API:
https://ej2.syncfusion.com/vue/documentation/api/schedule/#eventsettings
Regards,
Ruksar Moosa Sait