Last active
May 23, 2021 06:19
-
-
Save sandipchitale/a64458dde7883b51b8362e404947a88e to your computer and use it in GitHub Desktop.
QuickPickItem #vscode #QuickPickItem
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
class Item implements vscode.QuickPickItem { | |
label: string; | |
description?: string | undefined; | |
detail?: string | undefined; | |
picked?: boolean | undefined; | |
alwaysShow?: boolean | undefined; | |
constructor(label: string) { | |
this.label = label; | |
} | |
} | |
async function selectDebugeee(userItem: UserItem[]) { | |
const itemQuickPickItems: Item[] = []; | |
userItem.forEach(item => { | |
itemQuickPickItems.push( | |
new Item(item.label) | |
); | |
}); | |
const itemQuickPickItem = await vscode.window.showQuickPick(itemQuickPickItems, {}); | |
return itemQuickPickItem; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment