You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Conditional diagram changes causes weird bugs. If changing the diagram is set up to be changed conditionally, based on some flag, it will result in inconsistent diagram between toggles. Try to lock the diagram by preventing the calls to the onChange event, do some changes to the diagram visually, nothing should change (which is normal), unlock the diagram, and you will notice your changes (made while the diagram was locked) to be applied instantly on the diagram.
To Reproduce Reproduction
Steps to reproduce the behavior:
In the above code snippet, you are updating the nodes coordinates only if the onChange event prop is true, which is always the case given that it's always passed the reference of the function expression onNodesChange:
Fixing it should be as easy as passing the onChange prop provided by the user to the onChange prop of the NodesCanvas component, instead of passing it the always-true onNodesChange function expression.
Describe the bug
Conditional diagram changes causes weird bugs. If changing the diagram is set up to be changed conditionally, based on some flag, it will result in inconsistent diagram between toggles. Try to lock the diagram by preventing the calls to the
onChange
event, do some changes to the diagram visually, nothing should change (which is normal), unlock the diagram, and you will notice your changes (made while the diagram was locked) to be applied instantly on the diagram.To Reproduce
Reproduction
Steps to reproduce the behavior:
Expected behavior
For changes made while the diagram is locked not to be applied once the diagram is unlocked.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: