diff --git a/src/private/util.js b/src/private/util.js index f2217e89..5d67999d 100644 --- a/src/private/util.js +++ b/src/private/util.js @@ -82,8 +82,9 @@ const getLoadingState = () => { // vendored from dcc.Loading const loadingSelector = (componentPath, targetComponents) => state => { let stringPath = JSON.stringify(componentPath); - // Remove the last ] for easy match - stringPath = stringPath.substring(0, stringPath.length - 1); + // Remove the last ] for easy match and add `,` to make sure only children + // trigger the loading. See issue: https://github.com/plotly/dash/issues/3276 + stringPath = stringPath.substring(0, stringPath.length - 1) + ','; const loadingChildren = toPairs(state.loading).reduce((acc, [path, load]) => { if (path.startsWith(stringPath) && load.length) { if (