BitMEX-scaled-orders
BitMEX-scaled-orders copied to clipboard
Preview doesn't properly close if state changes are reverted
Expected Behavior
<PreviewContainer /> should properly close, if <ScaledContainer /> components states are the same as they were after <PreviewContainer /> was opened.
Current Behavior
If some kind of change is made and then reverted, <PreviewContainer /> doesn't close on "Preview" click.
- Current situation is handled using boolean
cachevariable that sets to false after every state change.
Possible Solution
Save state after opening and check before closing/opening.
Steps to Reproduce
- Open
<PreviewContainer />; - Delete any number of
<PreviewContainer />input and then revert it; - Press "Preview".
Possible Implementation
After opening the <PreviewContainer />, stringify and save its state to compare it before every open/close of <PreviewContainer />.