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

Implement drag and drop controller #431

Merged
merged 6 commits into from
Jun 23, 2021

Conversation

barbaravaldez
Copy link
Contributor

@barbaravaldez barbaravaldez commented May 28, 2021

Drag and drop implementation in sample tree view.
I had to modify the getChildren and getParent method since they wouldn't work when reparenting elements.
I implemented the dataProvider and dragAndDropController in the TestView class instead of passing them as functions to simplify the code.
https://user-images.githubusercontent.com/34872381/119911928-3801f880-bf0f-11eb-8505-c3fae098559b.mov

@alexr00 alexr00 self-assigned this May 31, 2021
tree-view-sample/src/testView.ts Outdated Show resolved Hide resolved
@alexr00 alexr00 added this to the June 2021 milestone Jun 2, 2021
Copy link
Member

@alexr00 alexr00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@barbaravaldez I have made some changes. Please let me know if they look ok to you!

@barbaravaldez
Copy link
Contributor Author

@barbaravaldez I have made some changes. Please let me know if they look ok to you!

Looks good to me! Thank you, @alexr00 😃

@alexr00 alexr00 merged commit bee31a7 into microsoft:main Jun 23, 2021
tamuratak pushed a commit to tamuratak/vscode-extension-samples that referenced this pull request Apr 29, 2022
* implement drag and drop in sample

* clean code

* fix reveal command

* remove unnecessary method

* fix getParent to return the existing node instead of creating a new key

* Linting, naming, etc.

Co-authored-by: Alex Ross <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants