Initial I set below, it's seem ok.
const eventStoreData = [...]; // Array
const resourceStoreData = [...]; // Array
scheduler.eventStore.data = eventStoreData;
scheduler.resourceStore.data = resourceStoreData;
When I doing some task, I need to reset data with:
const newEventStoreData = [...]; // Array
const newResourceStoreData = [...]; // Array
scheduler.eventStore.data = newEventStoreData;
scheduler.resourceStore.data = newResourceStoreData;
After data reset with that code, it's seem ok, but when I drag/drop it show error:
scheduler.module.js:19392 Uncaught (in promise) Error: Attempt to set item scheduler-a._.465-577-x to already existing member's id scheduler-a._.465-576-x
at Bag.changeId (scheduler.module.js:19392)
at HorizontalEventMapper.updateElementId (scheduler.module.js:109648)
at eval (scheduler.module.js:95496)
at Array.forEach (<anonymous>)
at eval (scheduler.module.js:95451)
at Array.forEach (<anonymous>)
at EventDrag.updateRecordsSingleAssignmentMode (scheduler.module.js:95423)
at EventDrag.updateRecords (scheduler.module.js:95367)
at EventDrag.finalize (scheduler.module.js:93873)
at EventDrag.onDrop (scheduler.module.js:93758)
changeId @ scheduler.module.js:19392
updateElementId @ scheduler.module.js:109648
eval @ scheduler.module.js:95496
eval @ scheduler.module.js:95451
updateRecordsSingleAssignmentMode @ scheduler.module.js:95423
updateRecords @ scheduler.module.js:95367
finalize @ scheduler.module.js:93873
onDrop @ scheduler.module.js:93758
trigger @ scheduler.module.js:3662
finishTranslateDrag @ scheduler.module.js:47979
onMouseUp @ scheduler.module.js:48785
handler @ scheduler.module.js:12068
Drag/drop behavior:
Drag/drop from position A to B -> it's seem ok -> reset data store -> it's seem ok.
Then continue to drag/drop from position B to A -> it's show error.
If I refresh browser every thing reload, it's ok.