-
Notifications
You must be signed in to change notification settings - Fork 39
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
Reordering (drag) functionality in Tree component #2222
Comments
@nimam-bentley Thanks for opening this issue. Just to confirm, when you say "sortable", you're talking about reordering, right? Our |
@mayank99 yes reordering. Thanks for the suggestion, if reordering is not natively supported by the time we publish our component I'll consider changing to React Aria. |
We would like to use drag and drop to support these three workflows:
Dragging multiple items at once is a nice-to-have feature, but not required for us. |
@Josh-Schifter Thanks for the added context. Of those three workflows, only 1 is relevant for this particular feature request. 2 and 3 are way out-of-scope, as they require cross-component coordination. I would also like to reiterate that the iTwinUI Would it help if we create an example demonstrating how to use iTwinUI |
Would the example cover all three of the workflows? If so, that would be fine. |
To accomplish our goals, I don't think we need a full-blown general drag and drop solution. That said, I'm not opposed to any approach that enables what we need. Hopefully the attached image helps to convey the three workflows we want to deliver. Restated here:
Perhaps this can all be done with a single tree? However, it is important that the 'uncategorized' section be visually distinct from the main tree... it can't look like just another folder. |
Feature
Drawing Production team has come across a need for a sortable Tree component for authoring capabilities to reorder Sheet Index structures. This would be drag and drop of nodes between any level of containers.
Examples
Ive used the antd library (example of draggable) to implement it for our use.
I can share the logic I used to identify the node being dragged and the parent of whats dropped, if that helps.
Heres a sample of my usage
The text was updated successfully, but these errors were encountered: