Skip to content

fix(renderer): clear paths for null children - #4052

Open
0d00ciallo0721 wants to merge 1 commit into
plotly:devfrom
0d00ciallo0721:agent-tasks/4033
Open

0d00ciallo0721 wants to merge 1 commit into
plotly:devfrom
0d00ciallo0721:agent-tasks/4033

Conversation

@0d00ciallo0721

Copy link
Copy Markdown

Fixes #4033.

Dash serializes a callback returning None for children as an explicit null value. The renderer treated all falsy child values as if the callback had omitted the property, so it skipped path recomputation. Removed descendants stayed in the Redux path table, allowing their callbacks to keep firing and preventing a clean remount. The renderer now skips recomputation only when the output property is absent (undefined).

Contributor Checklist

  • Scope: recompute paths for explicit children values, including null.
    • Add a browser integration regression for removing and remounting callback-generated children.
  • Run the relevant tests locally.
  • Add regression coverage for the bug.

Validation

  • python -m pytest tests/integration/callbacks/test_children_none.py --headless -xvs — passed; the same test failed on the unmodified base when the removed child remained in the path table.
  • python -m pytest tests/integration/callbacks/test_layout_paths_with_callbacks.py tests/integration/callbacks/test_wildcards.py -k 'cblp001 or cbwc003 or cbwc011 or cbwc014' --headless -xvs — 4 passed.
  • npm test in dash/dash-renderer — 123 passed.
  • Renderer build and npm run private::lint.renderer — successful. ESLint reported three warnings in untouched files.
  • Black, Flake8, and git diff --check — passed.

@0d00ciallo0721
0d00ciallo0721 marked this pull request as ready for review October 6, 2026 08:40
@sonarqubecloud

sonarqubecloud Bot commented Oct 6, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Setting children to None leaves removed components registered: their callbacks keep firing and the subtree can never be mounted again

2 participants