Skip to content

Commit

Permalink
Change option name
Browse files Browse the repository at this point in the history
  • Loading branch information
MicroFish91 committed Dec 19, 2023
1 parent a71b53a commit 6726afb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions utils/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1733,7 +1733,7 @@ export interface PickExperienceContext extends IActionContext {
* @param context The action context
* @param tdp Azure resource tree data provider to perform the pick experience on
*/
export declare function subscriptionExperience(context: IActionContext, tdp: TreeDataProvider<ResourceGroupsItem>, options?: { selectSubscriptionId?: string, showLoadingPrompt?: boolean }): Promise<AzureSubscription>;
export declare function subscriptionExperience(context: IActionContext, tdp: TreeDataProvider<ResourceGroupsItem>, options?: { selectBySubscriptionId?: string, showLoadingPrompt?: boolean }): Promise<AzureSubscription>;

/**
* Prompts the user to pick an Azure resource using a wizard comprised of quick pick steps.
Expand Down Expand Up @@ -1877,7 +1877,7 @@ export declare interface SkipIfOneQuickPickOptions extends GenericQuickPickOptio
}

export declare interface AzureSubscriptionQuickPickOptions extends GenericQuickPickOptions {
selectSubscriptionId?: string;
selectBySubscriptionId?: string;
}

export declare abstract class GenericQuickPickStep<TContext extends QuickPickWizardContext, TOptions extends GenericQuickPickOptions> extends AzureWizardPromptStep<TContext> {
Expand Down
4 changes: 2 additions & 2 deletions utils/src/pickTreeItem/experiences/subscriptionExperience.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ import { ResourceGroupsItem } from '../quickPickAzureResource/tempTypes';
export async function subscriptionExperience(
context: types.IActionContext,
tdp: vscode.TreeDataProvider<ResourceGroupsItem>,
options?: { selectSubscriptionId?: string, showLoadingPrompt?: boolean }
options?: { selectBySubscriptionId?: string, showLoadingPrompt?: boolean }
): Promise<AzureSubscription> {

const wizardContext = { ...context } as PickSubscriptionWizardContext;
wizardContext.pickedNodes = [];

const wizard = new AzureWizard(wizardContext, {
hideStepCount: true,
promptSteps: [new QuickPickAzureSubscriptionStep(tdp, { selectSubscriptionId: options?.selectSubscriptionId })],
promptSteps: [new QuickPickAzureSubscriptionStep(tdp, { selectBySubscriptionId: options?.selectBySubscriptionId })],
showLoadingPrompt: options?.showLoadingPrompt ?? true,
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export class QuickPickAzureSubscriptionStep extends GenericQuickPickStepWithComm
noPicksMessage: vscode.l10n.t('No subscriptions found'),
});

this.subscriptionId = options?.selectSubscriptionId;
this.subscriptionId = options?.selectBySubscriptionId;
}

protected readonly pickFilter = new AzureSubscriptionPickFilter();
Expand Down

0 comments on commit 6726afb

Please sign in to comment.