This repository was archived by the owner on Jun 3, 2024. It is now read-only.
This repository was archived by the owner on Jun 3, 2024. It is now read-only.
loading state data properties for dcc.Graph don't disappear #507
Open
Description
Currently, the loading state data properties are only updated on render
, rather than on plot
:
dash-core-components/src/components/Graph.react.js
Lines 252 to 266 in b1932f9
Since shouldComponentUpdate
returns false
if the the ID doesn't change, the data properties don't change once they've been added.
dash-core-components/src/components/Graph.react.js
Lines 215 to 220 in b1932f9
This fixed with two improvements:
- Update
shouldComponentUpdate
with a check forloading_state
, letting therender
re-render with the new data properties - Incorporate the
plot
command so that the loading state is updated once the chart finishes drawing.
1 would fix the bug, 2 would be a slight improvement.