What's the right conceptual approach to Draggable into a specific spot in a Sortable? #978
Unanswered
vincentjflorio
asked this question in
Q&A
Replies: 1 comment
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a generic map() list of Draggable components, with a normal container that is neither Droppable nor SortableContext.
I can successfully drag one of them items to a Droppable zone which has a SortableContext inside.
My adjusting the arrays, it makes it appear as if I have taken the original Draggable into the sortable list.
The two things I am running into are, when it drags, it always just gets added to the end of the list because it always gets added to the end of the array. So naturally I'd like to detect which specific sortable item the Draggable is currently over.
Instead, I only ever get a report in the console log that identifies the sortable context itself.
I read through the documentation and it sounded like sortable items were 'detectable' as droppable besides, but none of my console logs seem to want to report that.
Also, while the sortable items scoot out of the way once they're in there, I am not sure if it'll work as I am still hovering over them with a Draggable before having dropped it for the first time, for them to do the same.
To be clearer on that last part -- if I have items A and C already in the sortable list, with little to no space between, I'd like to see the gap form between A and C when B is coming around, before I release the mouse click, just in the same way as they rearrange when sorting amongst themselves.
I strongly believe the issue is something to do with my setup / the contexts and their nesting, etc. so I'm just curious if this is a supported use case and what "moves" I can make to achieve it (rather than assume there's any kind of bugginess when it's just my not-there-yet code :)
Beta Was this translation helpful? Give feedback.
All reactions