Skip to content

Fix/issue 3975 tree checkbox row move - #5283

Merged
fangsmile merged 5 commits into
developfrom
fix/issue-3975-tree-checkbox-row-move
Aug 20, 2026
Merged

Fix/issue 3975 tree checkbox row move#5283
fangsmile merged 5 commits into
developfrom
fix/issue-3975-tree-checkbox-row-move

Conversation

@fangsmile

@fangsmile fangsmile commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

🤔 This is a ...

  • Bug fix
  • Test Case
  • Demo update

🔗 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 1 matching 10. 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.ts to reproduce the old behavior and verify the fixed state after moving Project A.

📝 Changelog

Language Changelog
🇺🇸 English Fix tree checkbox state after row drag reorder.
🇨🇳 Chinese 修复树形表格行拖拽后 checkbox 状态未跟随节点移动的问题。

☑️ Self-Check before Merge

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

🚀 Summary

copilot:summary

🔍 Walkthrough

copilot:walkthrough

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
@fangsmile
fangsmile merged commit af04ca6 into develop Aug 20, 2026
7 of 8 checks passed
@fangsmile
fangsmile deleted the fix/issue-3975-tree-checkbox-row-move branch August 20, 2026 03:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] 多级树,复选框勾选父节点A和A的孩子节点A1,然后移动。移动后A1未选中,选中的原始A1所在行。

1 participant