Closed danbriggs5 closed 4 years ago
I am open to this. Agreed that this doesn't add any bulk to the library; however, it increases the API surface so not taking this lightly.
onChange
? Why? Maybe it should be called afterDrag
to pair with beforeDrag
?targetRect
(superset of clientX
and clientY
), so ideally we could return the same thing in all these events.onMove
interact with keyboard shortcuts?Willing to open a PR, update the documentation and add some tests? :)
Hi @tajo I've watched your talk at React Advanced London and thereby found this project. You've done very cool job! Mind if I take this issue?
@EternallLight sure, thanks!
Any update on this ?
There doesn't seem to be much traction / strong need. Closing for now. Happy to discuss additions later if people have good use-cases.
I appreciate your focus on minimalism and sticking to just the essentials! It's a great library. I'm wondering if any of the following additions would make the cut to be added?
onDragEnd
event that fires regardless of whether a change occurs or not. I'm usingbeforeDrag
to track when dragging is actually occurring and customizing the UI. But I need custom logic to determine when it stops.clientX
andclientY
positions as part of thebeforeDrag
event.onMove
event that includesclientX
andclientY
. I think 2&3 would allow for greater customization without adding any bulk to the library. Personally, I'd like to use 2&3 to change the cursor to a grabber only once the item has been dragged > 5px. Why? Because it's clickable until it's been dragged a few pixels (similar to Trello drag and drop).