Skip to content
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

Support single item (regardless of selection) drag and drop reordering in GridList #7449

Open
patrickdevivo opened this issue Nov 28, 2024 · 0 comments

Comments

@patrickdevivo
Copy link

Provide a general summary of the feature here

I've been following the instructions for a re-orderable GridList with drag and drop here: https://react-spectrum.adobe.com/react-aria/GridList.html#reorderable

However, it took me a while to realize that the drag+drop reordering behavior expects a set of selected items to be reordered. As in, it moves all the selected items, not just the item "grabbed" to be dragged.

I'm not sure if it makes sense generally, but it would be very helpful to my use case if there were a mode/setting/approach that only reordered the single item picked up by the drag event, not the whole selection.

I'm attempting to build a UI for controlling the visibility state and order state of columns in a data table:
image

The GridList selection state controls the column visibility, and I'd like to decouple that from the draggable items, so the user can reorder columns one at a time.

🤔 Expected Behavior?

Could it be possible to decouple the selected items from the drag behavior? So when dragging items, instead of moving the entire selection set, only moving the item that was "picked up"? Maybe this could be an additional mode or a setting?

😯 Current Behavior

Currently, the reordering/dragging moves the entire selection set, not just the single item that was "picked up"

💁 Possible Solution

No response

🔦 Context

(see above)

💻 Examples

No response

🧢 Your Company/Team

No response

🕷 Tracking Issue

No response

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

No branches or pull requests

1 participant