We experience "Entity.js:75 Uncaught Error: Already entered replica" error on updating data with syncDataOnLoad: true flag. On first data update this error comes alone. But if we ignore it and continue to update data, starting from second update it comes with 1 or 2 friends, see attached screenshot.
Interesting fact is that it not always prevents data from being updated. Sometimes I see data updated, sometimes not.
Test case attached. Expand nodes, scroll, try gantt.expandAll() in console to see error messages.
This seems to be critical for us as we need to preserve scroll/zoom etc. on data update. I see that there is a related ticket https://github.com/bryntum/support/issues/1864. Could you please confirm that it's a bug on Bryntum side and if it is how soon can we expect it to be fixed? Thank you.
This problem caused by adding existing tasks to store again in src/classes/ClzTaskStore.ts
onClzDataLoad({ data }: any) {
store.dispatch(setTasks(data));
}
Removing this line fixes the error.
I'm not sure what this code for, but you should clear existing tasks before re-adding them to store if you need it.
Please explain what is that code for so we can look for workaround for this.
Sergey, thanks for your answer, but unfortunately it makes no sense. It "fixes" the error because without this string you actually always set an empty array to the store data like this: taskStore.data = [];. As you may see without this line Gantt shows us no data at all.
In store.dispatch(setTasks(data)); line we just save initially loaded data to enrich and reuse it later. It's a Redux store call and it's just a side effect, not related to Gantt component at all.
Sorry for non-working suggestion.
I can offer you to try another workaround.
Try to configure project with repopulateOnDataset. It is yet internal config option but it is interesting for us to see if it works for you.
new ProjectModel({
repopulateOnDataset : false,
...
}
Thank you, with repopulateOnDataset : false flag errors stopped to appear. Problem seems to be solved this way.
Can we rely on this flag or we should wait for further updates from you regarding this?