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

[feature request] Drop onto another widget #2023

Open
dkozar opened this issue Feb 28, 2024 · 0 comments
Open

[feature request] Drop onto another widget #2023

dkozar opened this issue Feb 28, 2024 · 0 comments

Comments

@dkozar
Copy link

dkozar commented Feb 28, 2024

Describe the bug

When dragging a new item from from outside (see https://react-grid-layout.github.io/react-grid-layout/examples/15-drag-from-outside.html), other items move away, so you always drop the item into the blank space. This is fine.

However, I'd like to have the option of some widgets not moving away. Instead, they'd accept drop of the item from the outside onto them.

For example, this would be used when you want to replace an item in place.

This effect would happen only if the dragged item, and the one I'm dropping on, are marked with some sort of identifier. Or possibly, some sort of callback (returning boolean) could be in place (shouldItemAcceptDrop or similar).

Thanks,

Your Example Website or App

Steps to Reproduce the Bug or Issue

Expected behavior

As a user, I'd like to drag and drop a new widget from the outside, but onto another widget.

react-grid-layout library version

Latest

Operating System Version

MacOS

Browser

Chrome

Additional context

No response

Screenshots or Videos

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