Skip to content

Fix calculator checkbox order dependency in tree pruning - #1160

Merged
sei-vsarvepalli merged 1 commit into
CERTCC:mainfrom
Skalman:fix-calc-checkbox-order
Jun 10, 2026
Merged

sei-vsarvepalli merged 1 commit into
CERTCC:mainfrom
Skalman:fix-calc-checkbox-order

Conversation

@Skalman

@Skalman Skalman commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

check_select() pruned the decision tree incrementally via the rendered DOM nodes at the toggled decision point's depth, so branches hidden by an earlier selection were never updated and reappeared with stale state when re-checked. Checkboxes therefore only behaved when toggled in decision-point order.

Rebuild the pruning for the whole tree from the complete checkbox state on every toggle, walking the tree data (saved _schildren) instead of the rendered nodes, so toggle order no longer matters.

check_select() pruned the decision tree incrementally via the rendered
DOM nodes at the toggled decision point's depth, so branches hidden by
an earlier selection were never updated and reappeared with stale state
when re-checked. Checkboxes therefore only behaved when toggled in
decision-point order.

Rebuild the pruning for the whole tree from the complete checkbox state
on every toggle, walking the tree data (saved _schildren) instead of
the rendered nodes, so toggle order no longer matters.
@Skalman
Skalman requested a review from sei-vsarvepalli as a code owner June 10, 2026 10:50

@sei-vsarvepalli sei-vsarvepalli left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@sei-vsarvepalli
sei-vsarvepalli merged commit 41555ef into CERTCC:main Jun 10, 2026
2 checks passed
@Skalman
Skalman deleted the fix-calc-checkbox-order branch June 11, 2026 07:14
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.

2 participants