We found some peculiar behavior pertaining to syncNodeData in the event it was fed keys that are not found. In this case, it seems to remove the first node on the nodeDataArray. Could you clarify if that is the implementation?
For instance, this code will log the original node data array and then afterSyncNodeData is called, the second log will not include the first node on the node data array.
But how can that situation arise? Shouldn’t any data removals have already been processed by the diagram component, removing those keys from the diagram model?
We have a reset button that clears off any recently added nodes. When the button is pressed, the state is updated. After that point, the diagram’s modelChange function runs and the changes.removedNodeKeys are available. By when we syncNodeData with changes.removedNodeKeys, elements are removed from the synced nodes.