frontend-collective / react-sortable-tree

Drag-and-drop sortable component for nested data and hierarchies
https://frontend-collective.github.io/react-sortable-tree/
MIT License
4.9k stars 897 forks source link

Duplication of nodes in dom during scroll #904

Open e-lazorenko opened 3 years ago

e-lazorenko commented 3 years ago

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

Screenshots

b858cc91-e388-459d-a1f4-b9eb07244963

Screenshot_159

Screenshot_160