alcat2008 / react-drag-list

A simple draggable list component。

Home Page:http://front-ender.me/react-drag-list/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Get updated dataSource after drag end.

mayurikulkarni-tudip opened this issue · comments

Currently onUpdate callback function we got the only old index and the new index of dragged list item there should a callback for drag end just like onUpdate that will return me an updated dataSource.

@mayurikulkarni-tudip the dataSource changed all the time, so it's a waste of time and performance to recalculate it for each dragging, you can do it by yourself when necessary.

I have done it by moving the dataSource elements using the old and new index.

feat: return updated dataSource after drag end, add rowKey for render , please refer to this