Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jpogran committed Dec 3, 2024
1 parent 3b98d5e commit f7d6eba
Showing 1 changed file with 15 additions and 4 deletions.
19 changes: 15 additions & 4 deletions src/providers/tfc/uiHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,23 @@ export class APIQuickPick {
async pick(autoHide = true) {
await this.fetchResource();

const result = await new Promise<vscode.QuickPickItem | undefined>((c) => {
const result = await new Promise<vscode.QuickPickItem | undefined>((resolve) => {
this.quickPick.onDidAccept(() => {
c(this.quickPick.selectedItems[0]);
const selection = this.quickPick.selectedItems[0];
resolve(selection);
// this.quickPick.hide();
});

this.quickPick.onDidHide(() => {
c(undefined);
resolve(undefined);
// this.quickPick.dispose();
});
this.quickPick.show();

// this.quickPick.show();
});

// this.quickPick.show();

if (autoHide) {
this.quickPick.hide();
}
Expand All @@ -70,6 +77,10 @@ export class APIQuickPick {
hide() {
this.quickPick.hide();
}

dispose() {
this.quickPick.dispose();
}
}

export async function handleZodiosError(
Expand Down

0 comments on commit f7d6eba

Please sign in to comment.