Page 2 of 2

Re: [REACT] Capture the Calendar Event

Posted: Fri Mar 17, 2023 10:28 am
by saki

The dataChange event is meant to be called on each and every change so that data is synchronized immediately. If you need to synchronize to the server you can buffer for some time (100 - 500ms) until all user changes settle and send to the server after this delay.

However, if you have a "Save" button, then you don't need to listen to dataChange but you can get the changes of each store in https://bryntum.com/products/calendar/docs/api/Scheduler/data/EventStore#property-changes in the "Save" button click listener.


Re: [REACT] Capture the Calendar Event

Posted: Fri Mar 17, 2023 11:00 am
by Animal

The onDataChange callback is not really an event. It is a method which is called immediately upon the triggering of the dataChange event.

Using that will produce a call for every single mutation applied.

You should add a listener: https://bryntum.com/products/calendar/docs/api/Core/data/Store#config-listeners

Use the buffer option to "debounce" the event handling by adding a delay.


Re: [REACT] Capture the Calendar Event

Posted: Fri Mar 17, 2023 3:44 pm
by niranjan

I am able to use the onAfterEventSave and onDataChange functions to help with my CRUD operations.


Re: [REACT] Capture the Calendar Event

Posted: Fri Mar 17, 2023 5:19 pm
by marcio

Great niranjan,

Glad that you make it. Please don't hesitate to text us to ask for assistance when needed! :)