Skip to content

Commit a4bdc7d

Browse files
authored
Merge pull request #3278 from plotly/fix-loading-selector
Fix loading selector with children starting at the same digit
2 parents 9778a4c + fe78a05 commit a4bdc7d

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
All notable changes to `dash` will be documented in this file.
33
This project adheres to [Semantic Versioning](https://semver.org/).
44

5+
## [UNRELEASED]
6+
7+
## Fixed
8+
- [#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)
9+
510
## [3.0.3] - 2025-04-14
611

712
## Fixed

components/dash-core-components/src/components/Loading.react.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,9 @@ const coveringSpinner = {
3131

3232
const loadingSelector = (componentPath, targetComponents) => state => {
3333
let stringPath = JSON.stringify(componentPath);
34-
// Remove the last ] for easy match
35-
stringPath = stringPath.substring(0, stringPath.length - 1);
34+
// Remove the last ] for easy match and add `,` to make sure only children
35+
// trigger the loading. See issue: https://github.com/plotly/dash/issues/3276
36+
stringPath = stringPath.substring(0, stringPath.length - 1) + ',';
3637
const loadingChildren = toPairs(state.loading).reduce(
3738
(acc, [path, load]) => {
3839
if (path.startsWith(stringPath) && load.length) {

0 commit comments

Comments
 (0)