fix issue with finding required node handles#118091
Merged
alexr00 merged 1 commit intomicrosoft:mainfrom Mar 31, 2021
alanrenmsft:main
Merged
fix issue with finding required node handles#118091alexr00 merged 1 commit intomicrosoft:mainfrom alanrenmsft:main
alexr00 merged 1 commit intomicrosoft:mainfrom
alanrenmsft:main
Conversation
Contributor
Author
|
@weinand could you please take a look? |
Member
|
@alanrenmsft is there a way I can repro the issue with VS Code? |
Contributor
Author
|
@alexr00 I created an extension to reproduce the issue: https://github.com/alanrenmsft/test_tree
expected: it should only return the node at level 2, but instead it is returning both nodes. you can apply my changes locally and test it again, it should fix the problem. |
alexr00
reviewed
Mar 31, 2021
| @@ -497,12 +497,12 @@ class ExtHostTreeView<T> extends Disposable { | |||
|
|
|||
| private getHandlesToRefresh(elements: T[]): TreeItemHandle[] { | |||
| const elementsToUpdate = new Set<TreeItemHandle>(); | |||
Member
There was a problem hiding this comment.
With your change, I'm not sure we need this part anymore:
alexr00
approved these changes
Mar 31, 2021
Member
alexr00
left a comment
There was a problem hiding this comment.
Very good change. Thank you for the detailed steps and sample to repro with!
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



This PR fixes #microsoft/azuredatastudio#14229
when the elements parameter have leaf nodes then parent nodes, this method won't work and instead of only returning the parent node, it will also returned the leaf nodes. for example, the elements contains: '1/2' (2 is a child of 1) and '1', instead of returning '1' it will return both nodes.