tajo / react-movable

🔀 Drag and drop for your React lists and tables. Accessible. Tiny.
https://react-movable.pages.dev
MIT License
1.53k stars 51 forks source link

how can i get the order number of the items after they get moved ? #33

Closed PManager1 closed 4 years ago

tajo commented 4 years ago
onChange={({ oldIndex, newIndex }) =>
  // compute the order
}

onChange gives you oldIndex and newIndex so you can compute the new order.