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

Keep draggable in the home list when cloned #712

Open
orestis opened this issue Nov 6, 2023 · 4 comments
Open

Keep draggable in the home list when cloned #712

orestis opened this issue Nov 6, 2023 · 4 comments
Assignees

Comments

@orestis
Copy link

orestis commented Nov 6, 2023

Description

When cloning an element, it would be useful to have the option for the source Draggable to stay in the list.

This pattern is generally useful if you want to have a "source" list of items that can be dragged over a "target" list of items, but the source list itself is e.g. a gallery of widgets that can be added to a form. It doesn't make sense to remove the widget from the gallery, as the widgets never run out.

@100terres 100terres self-assigned this Nov 11, 2023
@michaelpginn
Copy link

+1, do you have a workaround for this in the meantime?

@orestis
Copy link
Author

orestis commented Dec 3, 2023

+1, do you have a workaround for this in the meantime?

Unfortunately no workaround that I could find.

@michaelpginn
Copy link

+1, do you have a workaround for this in the meantime?

Unfortunately no workaround that I could find.

I have a hacky solution where I render the items without dnd, and then render the Draggable versions directly on top and set opacity to 0. Then, you can provide a custom renderClone implementation to make the object visible while dragging.

@orestis
Copy link
Author

orestis commented Dec 4, 2023

The best kind of workaround! Much appreciated @michaelpginn 😄

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

3 participants