antonioru / antonioru/beautiful-react-diagrams

Conditional diagram changes causes weird bugs

オープン
#148 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
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 はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。