react-sortable-hoc icon indicating copy to clipboard operation
react-sortable-hoc copied to clipboard

Move onDrop clearup work to callback if provided

Open kenyxy opened this issue 5 years ago • 0 comments

when we drag an item to a new position it will fly back to original place if no onSortEnd function provided. this is reasonable and good. with onSortEnd function provided it will move to new position as the result of react reconciling. in my case my page is a little bit too complex and need a while to rerender so that I will see that the dropped item will fly back to original place and then move to new position later on. this is not a perfect animation for complex page. it will be perfect if we can control the timing of "fly back". I would suggest to move clearup work after line 946 (__this.helper.parentNode.removeChild(this.helper)) on react-sortable-hoc.esm.js to a callback function if user provided. can this possible?

kenyxy avatar Sep 29 '20 13:09 kenyxy