VisActor / VisActor/VTable

[Bug] 甘特图中,当tasksShowMode为Tasks_Separate时,使用setRecords使用不同数据进行第二次渲染时,type: project的父级甘特图不会自动计算时间区间

Open
#4,631 1 comment 0 reactions 0 assignees View on GitHub

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)
  1. 当1s延迟后,观察到顶部父级甘特条并没有正确显示出来,在拖动子级条后才正确显示
Image
Current Behavior

父级甘特条在setRecords后并没有正确显示出来

Expected Behavior

父级甘特条在setRecords后能够正确显示出来

Environment
- OS:
- Browser:
- Framework:
Any additional comments?

No response

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.