antonioru / antonioru/beautiful-react-diagrams
Conditional diagram changes causes weird bugs
- 主要言語
- JavaScript
- スター
- 2.7k
- フォーク
- 171
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
**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](https://codesandbox.io/s/condescending-bouman-c5y6s?file=/src/App.tsx)
Steps to reproduce the behavior:
1. Go to https://c5y6s.sse.codesandbox.io/.
2. Try to move any node, nothing moves, which is normal giving that the diagram is locked.
3. Press the "unlock" button below, and you will notice that your changes (made while the diagram was locked) are applied.
**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):**
- OS: Win64
- Browser: Chrome
- Version: 91
コントリビューションガイド
評価
この issue はまだ評価されていません。