Skip to content

Commit

Permalink
fix(uss): update USS directory icons when collapsed
Browse files Browse the repository at this point in the history
Signed-off-by: Trae Yelovich <[email protected]>
  • Loading branch information
traeok committed Sep 27, 2023
1 parent 9d74b9b commit e27d385
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/zowe-explorer/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ All notable changes to the "vscode-extension-for-zowe" extension will be documen
- Fixed issue where USS nodes were not removed from tree during deletion. [#2479](https://github.com/zowe/vscode-extension-for-zowe/issues/2479)
- Fixed issue where new USS nodes from a paste operation were not shown in tree until refreshed. [#2479](https://github.com/zowe/vscode-extension-for-zowe/issues/2479)
- Fixed issue where the "Delete Job" action showed a successful deletion message, even if the API returned an error.
- USS directories now update with a collapsed directory icon when the folder is collapsed.

## `2.11.0`

Expand Down
9 changes: 9 additions & 0 deletions packages/zowe-explorer/src/uss/USSTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,15 @@ export class USSTree extends ZoweTreeProvider implements IZoweTree<IZoweUSSTreeN
treeDataProvider: this,
canSelectMany: true,
});
this.treeView.onDidCollapseElement((e) => {
if (contextually.isUssDirectory(e.element)) {
const newIcon = getIconByNode(e.element);
if (newIcon) {
e.element.iconPath = newIcon;
this.mOnDidChangeTreeData.fire(e.element);
}
}
})
}

/**
Expand Down

0 comments on commit e27d385

Please sign in to comment.