Undo Behavior in GoJS and gojs-react: Addressing "initial merge" and "merge data" Transactions

Hello, I am currently implementing a diagram using GoJS version 2.3.12 and gojs-react version 1.1.2.

I am encountering an issue with the Undo behavior due to the occurrence of transactions during initialization using the ReactDiagram component from the gojs-react package.

When initializing the diagram using the ReactDiagram component, a transaction named “initial merge” occurs. After initialization, any model-changing operations (such as moving or deleting nodes) will trigger the corresponding transaction, and then a “merge data” transaction will be triggered.

In this scenario, attempting to Undo the most recent model-changing operation requires executing Undo twice for the expected behavior.

I am seeking guidance on how to address the “merge data” transaction.

When I run the gojs-react-basic sample, I as a user can make a bunch of modifications to the diagram, and then undo them correctly – one per user action. There’s no double-undo needed.

So I’m curious how your app is different in a meaningful manner from a sample one.