树图删除中间的某个节点并保留他的子节点
- Dominant language
- TypeScript
- Stars
- 12.3k
- Forks
- 1.6k
- PR merge metrics
- No merged PRs in 30d
Description
### Describe the bug / 问题描述
树图删除中间的某个节点,并将删除节点的所有子节点加入删除节点的父节点下,使用updateChildren或者先删后添加的方式都没办法展示出删除节点的父节点下连接删除节点的子节点,调试过程中发现他们之间的边未存在,但是当把删除节点的子节点的id改为另一个唯一id值时,可以正确展示,但是业务需要不能修改id,请问有什么解决办法吗?只更新删除节点父节点
### Reproduction link / 重现链接
_No response_
### Steps to Reproduce the Bug or Issue / 重现步骤
_No response_
### G6 Version / G6 版本
4.x
### Operating System / 操作系统
macOS
### Browser / 浏览器
Chrome
### Additional context / 补充说明
_No response_
Contributor guide
No contributing guide indexed for this repository
Research direction
No reproduction link, files, or tests are provided. Start by building a minimal G6 4.x tree example around updateChildren and the described delete-then-add flow, checking whether the parent-to-child edges are created when child IDs remain unchanged. Done means deleting an intermediate node preserves its children beneath the parent and displays all connecting edges without changing IDs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript, typescript
- Domain
- data-visualization, frontend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 32/100