-
-
Notifications
You must be signed in to change notification settings - Fork 112
Open
@vdh
Description
Due to the way the editor is wired to depend on the graphDiv
DOM element from react-plotly.js
, handleUpdate
is mutating the data
/layout
, and then uses onUpdate
as a "something changed" flag. So, it's essentially just bypassing the React render loop altogether by flowing some data mutations directly back to the embedded Plotly inside react-plotly.js
.
What it should be doing is using something like immutability-helper
to create an updated immutable copy of data
/layout
, and then send back those changes out as values to the onUpdate
callback. The callback would then update the higher state, and those new changes would flow back down into the data
& layout
props of both the Plot
and PlotlyEditor
components.
Metadata
Metadata
Assignees
Labels
No labels