Skip to content

Fix drag position 2 #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 14 commits into
base: fix-drag-position
Choose a base branch
from

Conversation

BRobin55
Copy link

Why

The drag-and-drop indication for item movement is flawed when an item of the collection is disabled. It is not possible to reorder the collection in a way that inserts the dragged item before or after the disabled item.

How

Modified the useDroppableCollection hook and adjusted the drop key and position logic for the stack layout . Disabled items keys will not be skipped. Items can be dropped anywhere with exception onto a disabled item.

WIP

For the grid layout, the drop indication has only been adjusted to no longer skip the disabled items. The logic for setting the drop position has not yet been changed. This could be addressed in future development.

@BRobin55 BRobin55 changed the base branch from main to fix-drag-position February 21, 2025 10:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants