react-spring icon indicating copy to clipboard operation
react-spring copied to clipboard

[bug]: Draggable List

Open richardHaggioGwati opened this issue 3 years ago • 1 comments

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

richardHaggioGwati avatar Jul 07 '22 14:07 richardHaggioGwati

Maybe i'm misunderstanding, but it seems to work for me?

https://user-images.githubusercontent.com/37798644/177800287-e3b23110-4a60-40de-8683-c2d3da5c24a2.mov

joshuaellis avatar Jul 07 '22 14:07 joshuaellis

Closing due to inactivity

joshuaellis avatar Apr 10 '23 15:04 joshuaellis