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

Freeze rows' position and add marker as an indicator of new position

Open Ptolol opened this issue 6 years ago • 1 comments

Good day! I'm trying to create a dnd list with

  1. ghost element
  2. marker that shows new position of the element
  3. static list

I used hideSortableGhost to left ghost element. But cannot understand how to freeze the list so I can show blue marker and drop the element. I tried to fix it with styles transform: translate3d(0, 0, 0)!important;, but now DnD doesn't work, it doesn't set new position for dragged element. Screenshot at Oct 14 13-52-31

Probably there is an example somewhere, I'd appreciate if someone will share it. Thank you for help!

Ptolol avatar Oct 14 '19 10:10 Ptolol

So, used transform: translate3d(0, 0, 0)!important; and onDragEnd with old and new indexes (+splice), seems like it works for now, but there is could be a better solution, I hope so

Ptolol avatar Oct 14 '19 12:10 Ptolol