-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
[TreeView] Support item reordering using drag and drop #12213
[TreeView] Support item reordering using drag and drop #12213
Conversation
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Congrats on this huge effort! 🎉 It's looking great! 🔥
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Firstly, I'm very sorry for a late review. 🙈
Congrats on such an awesome feature and superb implementation, great job! 👍 💯
A few comments:
- I believe that clicking Esc should cancel the dragging and releasing the mouse afterwards should not finish it.
- It would be nice to avoid the animation of the dragging item returning (floating) to the original place before finishing the dragging action.
...tree-view-pro/src/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.ts
Show resolved
Hide resolved
...iew-pro/src/internals/plugins/useTreeViewItemsReordering/useTreeViewItemsReordering.types.ts
Show resolved
Hide resolved
I opened a PR for the env check because it's trivial to fix and doing it before the release is better For the rest we can do a follow up
Fully agree, I'll fix that
Could you record your screen with this behavior visible to be sure I'm understand what you are referring to? |
Makes sense. 👌
Screen.Recording.2024-08-01.at.16.54.00.movI'm circling over the somewhat strange behavior—resembling a canceled drag. 🙈 |
Doc preview
Closes #9686
Requirements for this PR
RichTreeViewPro
component #12610getItemTree
andgetItemOrderedChildrenIds
methods to the public API #13804isEventTargetInDescendants
#13982Basic example
indentationAtItemLevel
experimental feature (see [TreeView] Allow to define indentation at the item level #13126)itemsReordering
prop and theitemsReordering
experimental featureCurrent status
TreeItem
TreeItem2