Skip to content

Commit

Permalink
fix: Dispose search quick picks after value consumed
Browse files Browse the repository at this point in the history
Signed-off-by: Trae Yelovich <[email protected]>
Co-authored-by: Fernando Rijo Cedeno <[email protected]>
  • Loading branch information
traeok and zFernand0 committed Feb 21, 2025
1 parent 53c1630 commit 4b99855
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions packages/zowe-explorer/src/trees/dataset/DatasetTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1227,6 +1227,7 @@ export class DatasetTree extends ZoweTreeProvider<IZoweDatasetTreeNode> implemen
quickpick.hide();
if (!choice) {
Gui.showMessage(vscode.l10n.t("No selection made. Operation cancelled."));
quickpick.dispose();
return;
}
if (choice instanceof FilterDescriptor) {
Expand All @@ -1236,6 +1237,7 @@ export class DatasetTree extends ZoweTreeProvider<IZoweDatasetTreeNode> implemen
} else {
pattern = choice.label;
}
quickpick.dispose();
}
const options: vscode.InputBoxOptions = {
prompt: vscode.l10n.t("Search data sets: use a comma to separate multiple patterns"),
Expand Down
2 changes: 2 additions & 0 deletions packages/zowe-explorer/src/trees/job/JobTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -671,8 +671,10 @@ export class JobTree extends ZoweTreeProvider<IZoweJobTreeNode> implements Types
quickpick.hide();
if (!choice) {
Gui.showMessage(vscode.l10n.t("No selection made. Operation cancelled."));
quickpick.dispose();
return undefined;
}
quickpick.dispose();
return choice as FilterItem;
}

Expand Down
2 changes: 2 additions & 0 deletions packages/zowe-explorer/src/trees/uss/USSTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,7 @@ export class USSTree extends ZoweTreeProvider<IZoweUSSTreeNode> implements Types
quickpick.hide();
if (!choice) {
Gui.showMessage(vscode.l10n.t("No selection made. Operation cancelled."));
quickpick.dispose();
return;
}
if (choice instanceof FilterDescriptor) {
Expand All @@ -713,6 +714,7 @@ export class USSTree extends ZoweTreeProvider<IZoweUSSTreeNode> implements Types
} else {
remotepath = choice.label;
}
quickpick.dispose();
}
// manually entering a search - switch to an input box
const options: vscode.InputBoxOptions = {
Expand Down

0 comments on commit 4b99855

Please sign in to comment.