mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-07 17:23:56 -05:00
remove refreshNode method (#14552)
* remove refreshNode method * fix issue with finding required node handles
This commit is contained in:
@@ -502,12 +502,12 @@ export class ExtHostTreeView<T> extends Disposable {
|
||||
// {{SQL CARBON EDIT}}
|
||||
protected getHandlesToRefresh(elements: T[]): TreeItemHandle[] {
|
||||
const elementsToUpdate = new Set<TreeItemHandle>();
|
||||
for (const element of elements) {
|
||||
const elementNode = this.nodes.get(element);
|
||||
const elementNodes = elements.map(element => this.nodes.get(element));
|
||||
for (const elementNode of elementNodes) {
|
||||
if (elementNode && !elementsToUpdate.has(elementNode.item.handle)) {
|
||||
// check if an ancestor of extElement is already in the elements to update list
|
||||
// check if an ancestor of extElement is already in the elements list
|
||||
let currentNode: TreeNode | undefined = elementNode;
|
||||
while (currentNode && currentNode.parent && !elementsToUpdate.has(currentNode.parent.item.handle)) {
|
||||
while (currentNode && currentNode.parent && elementNodes.findIndex(node => currentNode && currentNode.parent && node && node.item.handle === currentNode.parent.item.handle) === -1) {
|
||||
const parentElement: T | undefined = this.elements.get(currentNode.parent.item.handle);
|
||||
currentNode = parentElement ? this.nodes.get(parentElement) : undefined;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user