Fix/issue 3975 tree checkbox row move - #5283
Merged
Merged
Conversation
Move checkbox state by record path during tree row reordering. Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com
Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com
Use record paths for radio state migration. Keep radio and checkbox row drag semantics aligned. Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com
Use ListTableAPI for row move record path lookup. Avoid hardcoded column indexes when moving rows. Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com
Handle string record paths when migrating radio state. Cover serialized tree paths in row move tests. Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
🤔 This is a ...
🔗 Related issue link
close #3975
💡 Background and solution
Tree ListTable row drag can reorder the underlying records while checkbox state is still keyed by the old record path. When a checked parent and child node are moved, the child checkbox state can stay on the original row path instead of following the moved tree node.
This PR updates checkbox state migration to use real record paths before reordering records. The migration now rebuilds checkbox state from a snapshot, compares path segments numerically, and avoids prefix collisions such as
1matching10. It also keeps transpose ListTable from mutating record order in this path.A demo is added at
examples/list/issue-3975-tree-checkbox-row-move.tsto reproduce the old behavior and verify the fixed state after movingProject A.📝 Changelog
☑️ Self-Check before Merge
🚀 Summary
copilot:summary
🔍 Walkthrough
copilot:walkthrough