We have been facing an issue that causes us some trouble.
Why the method from the Scheduler "beforeEventAdd" is called 2 Times?
- The First time when the Event Editor is Displayed
- The Second time when the Event Editor is closed after having pressed the button Save
Look at the screenshot
To reproduce the issue please go to your online demo (https://www.bryntum.com/examples/scheduler/basic/)
then open up the Code Editor and add the code below:
listeners : {
beforeEventAdd ({source, widget, eventRecord , resources }){
console.log('Event is being Added ...',source, widget, eventRecord , resources);
}
}
Then When saving the event another call to the method is carried out.
Is this a normal behavior, because the online document mentions :
thus it is obvious that something is going wrong!beforeEventAdd:
Fires on the owning Scheduler before an event is added