Reactive datasource

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


3 Replies 1 reply marked as answer

RM Ruksar Moosa Sait Syncfusion Team June 29, 2022 11:07 AM UTC

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



FR Frank replied to Ruksar Moosa Sait July 19, 2022 08:58 AM UTC

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?



RM Ruksar Moosa Sait Syncfusion Team July 20, 2022 03:43 PM UTC

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?

  • Share the entire scheduler codes with MS graph API or
  • Replicate the issue in the attached sample.


API:

https://ej2.syncfusion.com/vue/documentation/api/schedule/#eventsettings


Regards,

Ruksar Moosa Sait


Attachment: Ej2VueSchedulerSample_ebb15b44.zip

Marked as answer
Loader.
Up arrow icon