Skip to content

Commit b20ab39

Browse files
authored
Bugfix for vendored loadingSelector function (#1140)
1 parent 65951d7 commit b20ab39

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/private/util.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,9 @@ const getLoadingState = () => {
8282
// vendored from dcc.Loading
8383
const loadingSelector = (componentPath, targetComponents) => state => {
8484
let stringPath = JSON.stringify(componentPath);
85-
// Remove the last ] for easy match
86-
stringPath = stringPath.substring(0, stringPath.length - 1);
85+
// Remove the last ] for easy match and add `,` to make sure only children
86+
// trigger the loading. See issue: https://github.com/plotly/dash/issues/3276
87+
stringPath = stringPath.substring(0, stringPath.length - 1) + ',';
8788
const loadingChildren = toPairs(state.loading).reduce((acc, [path, load]) => {
8889
if (path.startsWith(stringPath) && load.length) {
8990
if (

0 commit comments

Comments
 (0)