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

Drag & Drop #6149

Closed
nlatipov opened this issue Aug 22, 2022 · 4 comments
Closed

Drag & Drop #6149

nlatipov opened this issue Aug 22, 2022 · 4 comments

Comments

@nlatipov
Copy link

The Unified Search team is developing a Filter builder component (PR) that will allow you to create a Complex filter capabilities - Support ORs.
One of the subtasks is to allow the user to make relationships between filters using drag and drop.

We managed to achieve a very interesting result - we can use the drag and drop (EuiDroppable, EuiDraggable) components in each filter and with the help of the EuiDragDropContext's onDragEnd method we can set the movement between the drop zones.

Demo

Filter.Builder.mov

However, we ran into the problem that when we have this nesting, we can't drag from the last element one level up. The drop zone does not appear under the 5th element.

From which we cannot correctly drag the element, and also if the dragged element is wider than the drop zone, we cannot drag it into this zone.

Demo

bug.with.drag.and.drop.mov
@nlatipov nlatipov added the bug label Aug 22, 2022
@thompsongl
Copy link
Contributor

Hey @nlatipov

This has come up a few times previously (#3399, #4024), and the problem is that the underlying library that supplies the majority of functionality does not support nested drag contexts: atlassian/react-beautiful-dnd#302

There are some potential workarounds mentioned in the issues I've linked, but there are further accessibility concerns about nested drag contexts that haven't been addressed.

@nlatipov
Copy link
Author

@thompsongl thanks a lot for your help. I hope your links will help in our cases

@github-actions
Copy link

👋 Hey there. This issue hasn't had any activity for 180 days. We'll automatically close it if that trend continues for another week. If you feel this issue is still valid and needs attention please let us know with a comment.

@github-actions
Copy link

❌ We're automatically closing this issue due to lack of activity. Please comment if you feel this was done in error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants