From c69b6e850d3b92400ee0a5ac45df341fc992b433 Mon Sep 17 00:00:00 2001 From: tcbegley Date: Fri, 15 Aug 2025 22:40:42 +0100 Subject: [PATCH] Bugfix for vendored loadingSelector function --- src/private/util.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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 (