Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

utils: allow grouping multi-select quick picks #1845

Merged
merged 1 commit into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading