segmentio / evergreen

🌲 Evergreen React UI Framework by Segment
https://evergreen.segment.com
MIT License
12.39k stars 832 forks source link

Hide or Show Dialog, Instead of Closing and Removing the DOM Reference #1283

Open martineboh opened 3 years ago

martineboh commented 3 years ago

I am creating a chart component with Plotly, and the requirment was to show a plot in a popup-like dialog, so I chose to implement this with Evergreen Dialog component instead of using window.open(). First time, the plot shows very well with animation. On close, I discovered the plot re-initialized. Is this behaviour normal? Shouldn't the Dialog hide and show with previous state and look? If NO, how do I just hide and show the Dialog content without losing DOM reference?