Premium support for our pure JavaScript UI components


Post by pzs »

Hi,

similar issue to my previous forum topic ( viewtopic.php?f=51&t=21988 ).

It seems it's SchedulerPro related issue and it works in normal Scheduler. Tested in 5.1.1.

Steps to reproduce:

  • open: https://bryntum.com/examples/scheduler-pro/inline-data/
  • run in console:
    let r = schedulerPro.eventStore.getById(1);
    let data = {id: 1, resourceId: r.resourceId, startDate: r.startDate, endDate: r.endDate};
    schedulerPro.eventStore.remove(schedulerPro.eventStore.getById(1));
    schedulerPro.eventStore.add([{...data, name:'a1'}]);
    schedulerPro.eventStore.remove(schedulerPro.eventStore.getById(1));
    schedulerPro.eventStore.add([{...data, name:'a2'}]);
    

Excepted: first event re-created and visible with name "a2"
Actual: first event got removed and not added again

Notes:

  • schedulerPro.refresh() does not help here,
  • if you add await commitAsync(), then it will work:
    let r = schedulerPro.eventStore.getById(1);
    let data = {id: 1, resourceId: r.resourceId, startDate: r.startDate, endDate: r.endDate};
    schedulerPro.eventStore.remove(schedulerPro.eventStore.getById(1));
    schedulerPro.eventStore.add([{...data, name:'a1'}]);
    await schedulerPro.eventStore.project.commitAsync(); // <-- added line
    schedulerPro.eventStore.remove(schedulerPro.eventStore.getById(1));
    schedulerPro.eventStore.add([{...data, name:'a2'}]);
    

Post by marcio »

Hi pzs,

Thanks for the detailed report and example, I reproduced here, and create a bug fix ticket related to this https://github.com/bryntum/support/issues/5048

Best regards,
Márcio


Post by pzs »

It seems it's fixed in SchedulerPro 5.2.1


Post by marcio »

Thanks for the update pzs! :)

Best regards,
Márcio


Post Reply