react-component / react-component/tree

Virtual tree Auto scroll to top when moving node to top

Open
#811 0 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
1.3k
Forks
490
Avg merge
3d 17h
Merged PRs (30d)
5

Description

We have larger tree structures to render, we faced performance issues with rc-tree. The we have added the virtualization with help virtual & itemHeight and height props. performance wise it was good but we are face issue when we are trining to move the 500th node (not present at DOM first load) to top then tree was not auto scrolling to top.

<RcTree
    ref={rcTreeRef}
    motion={motion}
    onDrop={onDrop}
    expandedKeys={expandedKeys}
    onExpand={onExpand}
    selectedKeys={selectedKeys}
    onSelect={onSelectNode}
    height={400}
    itemHeight={30}
    virtual
    draggable
>
   {treeNodes}
</RcTree>

Contributor guide

No contributing guide indexed for this repository

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 by reproducing the reported case with the provided RcTree configuration: virtual rendering, itemHeight 30, height 400, and dragging the 500th node to the top. Trace the virtual scrolling and drag-and-drop behavior from the RcTree entry point; done means the tree automatically scrolls to the top when that move occurs, without regressing virtualization performance.

Written by the indexing model from the issue text.

Assessment

Tech stack
react, typescript
Domain
frontend, performance
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.