react-spring
react-spring copied to clipboard
[bug]: Draggable List
Which react-spring target are you using?
- [X]
@react-spring/web - [ ]
@react-spring/three - [ ]
@react-spring/native - [ ]
@react-spring/konva - [ ]
@react-spring/zdog
What version of react-spring are you using?
9.4.5
What's Wrong?
The useSprings documentation page includes a Draggable list demo. Within the typescript code, the DraggableList function is expecting an array to create the list but once the items are greater than 4, the list creates space and is unable to pop an item to the bottom once it has been dragged down. If you have 6 items, they begin to stack on top of each other.
To Reproduce
Create an array to add to the DraggableList function and pass it into the function with 5 elements
Expected Behaviour
Expect the elements to increase without adding an empty slot and not stacking on top of each other.
Link to repo
https://codesandbox.io/s/jovial-currying-mtx2m5?file=/src/App.tsx
Maybe i'm misunderstanding, but it seems to work for me?
https://user-images.githubusercontent.com/37798644/177800287-e3b23110-4a60-40de-8683-c2d3da5c24a2.mov
Closing due to inactivity