[Bug] 甘特图中,当tasksShowMode为Tasks_Separate时,使用setRecords使用不同数据进行第二次渲染时,type: project的父级甘特图不会自动计算时间区间
Open
Nobody has claimed this yet.
bug
- Dominant language
- TypeScript
- Stars
- 3.7k
- Forks
- 486
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 16
Description
Version
1.22.0
Link to Minimal Reproduction
https://visactor.io/vtable/demo/gantt/gantt-project-taskShowMode
Steps to Reproduce
1.打开上述链接
2.删除第220行:tasksShowMode: VTableGantt.TYPES.TasksShowMode.Project_Sub_Tasks_Inline,
3. 增加下列代码
setTimeout(() => {
ganttInstance.setRecords([{
id: 0,
name: 'Planning',
type: 'project',
children: [
{
id: 1,
name: 'Michael Smith 1',
start: '2024-11-15',
end: '2024-11-16',
avatar: 'https://lf9-dp-fe-cms-tos.byteorg.com/obj/bit-cloud/VTable/custom-render/wolf.jpg'
}
]
}])
}, 1000)
- 当1s延迟后,观察到顶部父级甘特条并没有正确显示出来,在拖动子级条后才正确显示
Current Behavior
父级甘特条在setRecords后并没有正确显示出来
Expected Behavior
父级甘特条在setRecords后能够正确显示出来
Environment
- OS:
- Browser:
- Framework:
Any additional comments?
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the gantt project/taskShowMode demo linked in the issue and reproduce the delayed setRecords update with Tasks_Separate and a project parent. Trace the update and time-range calculation path used after records change; done means the parent gantt bar displays the correct interval immediately after setRecords, without dragging a child task.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- data-visualization, frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100