frontend-collective / frontend-collective/react-sortable-tree

Duplication of nodes in dom during scroll

Open
#904 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
JavaScript
Stars
5k
Forks
914
PR merge metrics
No merged PRs in 30d

Description

### Problem

When new nodes added while scrolling, some of the nodes are duplicated in the dom, regardless that treeData stays valid.
The problem occurs only when you try to update several parent nodes at once and only during scrolling.
Any suggestions?

### CodeSandbox

Try to scroll container during the append operation (new nodes are added every 3s)
[https://codesandbox.io/s/vigilant-sound-ccgzq](https://codesandbox.io/s/vigilant-sound-ccgzq)

### Screenshots

![b858cc91-e388-459d-a1f4-b9eb07244963](https://user-images.githubusercontent.com/22461210/123949131-e683d800-d9aa-11eb-81e6-6c8eb187cfce.gif)

![Screenshot_159](https://user-images.githubusercontent.com/22461210/123948210-dd463b80-d9a9-11eb-844a-afb226968131.png)

![Screenshot_160](https://user-images.githubusercontent.com/22461210/123948225-df0fff00-d9a9-11eb-876a-a20c9c6066d7.png)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.