Skip to content

Commit

Permalink
utils: allow grouping multi-select quick picks (#1845)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexweininger authored Dec 3, 2024
1 parent fb76dbf commit ac1caa7
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 8 deletions.
1 change: 0 additions & 1 deletion utils/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1047,7 +1047,6 @@ export interface IAzureQuickPickOptions extends VSCodeQuickPickOptions, AzExtUse

/**
* If true, you must specify a `group` property on each `IAzureQuickPickItem` and the picks will be grouped into collapsible sections
* This is not compatible with `canPickMany`
*/
enableGrouping?: boolean;

Expand Down
4 changes: 2 additions & 2 deletions utils/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion utils/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@microsoft/vscode-azext-utils",
"author": "Microsoft Corporation",
"version": "2.5.11",
"version": "2.5.12",
"description": "Common UI tools for developing Azure extensions for VS Code",
"tags": [
"azure",
Expand Down
4 changes: 0 additions & 4 deletions utils/src/userInput/showQuickPick.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,10 +157,6 @@ export async function createQuickPickItems<TPick extends types.IAzureQuickPickIt
} else if (!options.enableGrouping) {
return picks;
} else {
if (options.canPickMany) {
throw new Error('Internal error: "canPickMany" and "enableGrouping" are not supported at the same time.')
}

for (const pick of picks) {
const groupName: string | undefined = pick.group;
const group = groups.find(g => g.name === groupName);
Expand Down

0 comments on commit ac1caa7

Please sign in to comment.