-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
feat(drag-drop): add option for items to be returned to original list if not dropped on container #18610
Comments
I couldn't reproduce it against any of the examples from the docs, but I'm not sure I understand the instructions. At step 2 am I supposed to move one item, but then at step 3 move over all the other items? |
He's talking about the design decision of how letting go of a dragged item will always send it back to the last sorted container, and not necessarily the initial container (which is desired in his case). It seems it would be a good option, and sort of falls under the same category of an "abort drag" feature that resets all containers back to initial state before any |
I see. The reason why it currently works this way is that it would look weird if we snapped it back into the initial list, because there's nothing taking up the space for it anymore. |
@Achilles1515: You're right. I solved it as follows: onDragStarted(event: CdkDragStart) { onDragReleased(event: CdkDragRelease) { I hope there would be a better way. |
@MrPollux Can you add your droplist event code? |
@MrPollux, @Achilles1515, this zip file is no longer available, could you upload it again? |
Just a heads up that we kicked off a community voting process for your feature request. There are 20 days until the voting process ends. Find more details about Angular's feature request process in our documentation. |
Thank you for submitting your feature request! Looks like during the polling process it didn't collect a sufficient number of votes to move to the next stage. We want to keep Angular rich and ergonomic and at the same time be mindful about its scope and learning journey. If you think your request could live outside Angular's scope, we'd encourage you to collaborate with the community on publishing it as an open source package. You can find more details about the feature request process in our documentation. |
I have a similar requirement where I want to move something between two lists. I'm able to reset it by checking the |
Steps to reproduce:
Expected Behavior
The item should transform to initial container and initial position.
Actual Behavior
The item transforms to the position of the last hovered item of the last entered container.
Environment
The text was updated successfully, but these errors were encountered: