-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
CDK Drag and Drop: Nested Drag and Drop does not allow sorting on same level #18503
Comments
I spent a bit of time on this, but it looks like it'll be tricky if we want to cover all the cases. I have a solution that somewhat works here, but there are definitely edge cases that it won't cover. |
any news on this? got the very same problem and still struggling to find a decent workaround EDIT: ok there seem to be several issues opened on this topic for sometime, actually most of the issues related to drag & drop. I wonder if it will ever get addressed by the team... Anyway, the workaround suggested by the user sheese in #16671 seems to work in my case too. So
Additional suggestion to those that may reach this page |
@stefanomiccoli - thanks for the update! I ended up changing my DOM structure and avoiding any nested Drag and Drop. I needed Drag and Drop in and between trees, but finally used flat lists of DIVs instead (+several Divs outside the actual tree). CSS and JS make it look like an actual tree but in fact, it is just a flat list. |
+1 |
Duplicate of #16671. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
Reproduction
StackBlitz: https://stackblitz.com/edit/angular-wfrzq9
Steps to reproduce:
Expected Behavior
Dragging within the inner cdkDropList should work, the outher cdkDropList should only fire if the element is moved out of its list.
Actual Behavior
The inner cdkDropList does listen to the drag - the outer list is called.
might be caused by
components/src/cdk/drag-drop/directives/drop-list.ts 304:
ref.connectedTo(siblings.filter(drop => drop && drop !== this).map(list => list._dropListRef))
Environment
The text was updated successfully, but these errors were encountered: