Hi,
We are implementing Live Updates in a web application with Angular 14 and .NET 8, Gantt version 6.0.4. Sending a revision with update works, but not when deleting a Task, for example.
Part of the object received with the 'revisionNotification' event and sent to the backend:
changes.tasks: {
$input: { removed: [] }
removed: [{ id: 103158 }]
}
We return the same object from the backend to the Angular client using SignalR, to then use it with applyRevisions(). Adding the id object in $input.removed, as we see in your example that the array is filled.
changes.tasks: {
$input: { removed: [{ id: 103158 }] }
removed: [{ id: 103158 }]
}
Error generated in Angular client after executing applyRevisions():
Error: Uncaught (in promise): TypeError: Cannot read properties of undefined (reading 'id')
TypeError: Cannot read properties of undefined (reading 'id')
at StoreBag.includes (gantt.module.js:24007:65)
at TaskStore.applyRemovals (gantt.module.js:25135:24)
at TaskStore.applyChangeset (gantt.module.js:25079:10)
at TaskStore.applyChangeset (gantt.module.js:32423:52)
at TaskStore.applyChangeset (gantt.module.js:203925:23)
at ProjectModel3.applyChangeset (gantt.module.js:131712:34)
at gantt.module.js:192803:8
at Generator.next (<anonymous>)
at asyncGeneratorStep (asyncToGenerator.js:3:1)
at _next (asyncToGenerator.js:25:1)
at resolvePromise (zone.js:1211:31)
at zone.js:1118:17
at zone.js:1134:33
at asyncGeneratorStep (asyncToGenerator.js:6:1)
at _throw (asyncToGenerator.js:29:1)
at _ZoneDelegate.invoke (zone.js:372:26)
at Object.onInvoke (core.mjs:26231:33)
at _ZoneDelegate.invoke (zone.js:371:52)
at Zone.run (zone.js:134:43)
at zone.js:1275:36
Thanks!