Our pure JavaScript Scheduler component


Post by SIM-LTD »

Hi

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 DoubleClick or Right Clik to Add an Event and you'll see the method is called once when editor is open
Then When saving the event another call to the method is carried out.

Is this a normal behavior, because the online document mentions :
beforeEventAdd:
Fires on the owning Scheduler before an event is added
thus it is obvious that something is going wrong!
Attachments
Capture d’écran 2019-06-19 à 20.59.37.png
Capture d’écran 2019-06-19 à 20.59.37.png (229.9 KiB) Viewed 639 times
Capture d’écran 2019-06-19 à 20.59.59.png
Capture d’écran 2019-06-19 à 20.59.59.png (252.12 KiB) Viewed 639 times

Post by pmiklashevich »

Pavlo Miklashevych
Sr. Frontend Developer


Post Reply