plotly / dash

Data Apps & Dashboards for Python. No JavaScript Required.
https://plotly.com/dash
MIT License
21.53k stars 2.07k forks source link

🐛 add missing useEffect dependency to dcc.Loading component #2956

Closed KoolADE85 closed 3 months ago

KoolADE85 commented 3 months ago

This PR adds a missing dependency to the useEffect in the dcc.Loading component. This fixes a bug where it is possible for the loading spinner to be left enabled, even though loading has finished.

Fixes https://github.com/plotly/notebook-to-app/issues/1674

Note: I haven't been able to write a integration test that covers this code change precisely. The bug does not normally make an appearance - it's only in rare React race conditions that it is possible to get the "infinite loading bars".

@gvwilson since this affects internal projects, I'd love to get your team's eyes on this so we could maybe do a patch release?

Contributor Checklist

optionals