clauderic / clauderic/react-sortable-hoc

Combining items

Open
#510 7 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
10.9k
Forks
959
PR merge metrics
No merged PRs in 30d

Description

Is something like this: https://github.com/atlassian/react-beautiful-dnd/blob/master/docs/guides/combining.md possible with this lib?
I need grid and merge support (for merge I mean exactly dragging one item to drop it over another item)

I think this would be simple to implement. I'd just need a "delayAnimationBasedOnDistance" prop (clearly the name isn't too good) in order to not start the animation if the dragged items moves only of (let's say) 200px and do something on over, if left there the "onSortEnd" function will take care of remove that item from the array and do something else with it.

I believe this "delayAnimationBasedOnDistance" could also be implemented without touching the codebase, basically I could register an onMove callback and keep the other items still until the cursor moved of N pixels.

What do you think? Should this work for you? If so I could do a PR.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reading the linked react-beautiful-dnd combining guide and the library's existing drag callbacks, especially onMove and onSortEnd, which the issue mentions. Clarify whether the goal is grid support, merging on drop, distance-based animation delay, or all three; done would require agreed behavior and tests for dragging one item over another.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript, react
Domain
frontend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.