From c12b542f762e9fc6b4d1addb704e5dc142081b89 Mon Sep 17 00:00:00 2001 From: philippe Date: Tue, 15 Apr 2025 10:49:35 -0400 Subject: [PATCH 1/2] Fix loading selector with children starting at the same digit --- .../dash-core-components/src/components/Loading.react.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/components/dash-core-components/src/components/Loading.react.js b/components/dash-core-components/src/components/Loading.react.js index 48e70b4381..f703056c8b 100644 --- a/components/dash-core-components/src/components/Loading.react.js +++ b/components/dash-core-components/src/components/Loading.react.js @@ -31,8 +31,9 @@ const coveringSpinner = { 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) { From fe78a0586384f6051505bb8198d1308c2a20a67a Mon Sep 17 00:00:00 2001 From: philippe Date: Tue, 15 Apr 2025 13:42:33 -0400 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 567d5d322f..72747a0fba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,11 @@ All notable changes to `dash` will be documented in this file. This project adheres to [Semantic Versioning](https://semver.org/). +## [UNRELEASED] + +## Fixed +- [#3278](https://github.com/plotly/dash/pull/3278) Fix loading selector with children starting at the same digit. Fix [#3276](https://github.com/plotly/dash/issues/3276) + ## [3.0.3] - 2025-04-14 ## Fixed