Theia API Documentation v1.68.0
    Preparing search index...

    Interface QuickPick<T>

    A concrete QuickInput to let the user pick an item from a list of items of type T.

    The items can be filtered through a filter text field and there is an option canSelectMany to allow for selecting multiple items.

    Note that in many cases the more convenient window.showQuickPick is easier to use. window.createQuickPick should be used when window.showQuickPick does not offer the required flexibility.

    interface QuickPick<T extends QuickPickItem> {
        activeItems: readonly T[];
        busy: boolean;
        buttons: readonly QuickInputButton[];
        canSelectMany: boolean;
        enabled: boolean;
        ignoreFocusOut: boolean;
        items: readonly T[];
        keepScrollPosition?: boolean;
        matchOnDescription: boolean;
        matchOnDetail: boolean;
        onDidAccept: Event<void>;
        onDidChangeActive: Event<readonly T[]>;
        onDidChangeSelection: Event<readonly T[]>;
        onDidChangeValue: Event<string>;
        onDidHide: Event<void>;
        onDidTriggerButton: Event<QuickInputButton>;
        onDidTriggerItemButton: Event<QuickPickItemButtonEvent<T>>;
        placeholder: undefined | string;
        prompt: undefined | string;
        selectedItems: readonly T[];
        step: undefined | number;
        title: undefined | string;
        totalSteps: undefined | number;
        value: string;
        dispose(): void;
        hide(): void;
        show(): void;
    }

    Type Parameters

    Hierarchy (View Summary)

    Implemented by

    Index

    Properties

    activeItems: readonly T[]

    Active items. This can be read and updated by the extension.

    busy: boolean

    Determines if the UI should show a progress indicator. Defaults to false.

    Change this to true, for example, while loading more data or validating user input.

    buttons: readonly QuickInputButton[]

    Buttons for actions in the UI.

    canSelectMany: boolean

    Determines if multiple items can be selected at the same time. Defaults to false.

    enabled: boolean

    Determines if the UI should allow for user input. Defaults to true.

    Change this to false, for example, while validating user input or loading data for the next step in user input.

    ignoreFocusOut: boolean

    Determines if the UI should stay open even when losing UI focus. Defaults to false. This setting is ignored on iPad and is always false.

    items: readonly T[]

    Items to pick from. This can be read and updated by the extension.

    keepScrollPosition?: boolean

    Determines if the scroll position is maintained when the quick pick items are updated. Defaults to false.

    matchOnDescription: boolean

    Determines if the filter text should also be matched against the description of the items. Defaults to false.

    matchOnDetail: boolean

    Determines if the filter text should also be matched against the detail of the items. Defaults to false.

    onDidAccept: Event<void>

    An event signaling when the user indicated acceptance of the selected item(s).

    onDidChangeActive: Event<readonly T[]>

    An event signaling when the active items have changed.

    onDidChangeSelection: Event<readonly T[]>

    An event signaling when the selected items have changed.

    onDidChangeValue: Event<string>

    An event signaling when the value of the filter text has changed.

    onDidHide: Event<void>

    An event signaling when this input UI is hidden.

    There are several reasons why this UI might have to be hidden and the extension will be notified through onDidHide. Examples include: an explicit call to hide, the user pressing Esc, some other input UI opening, etc.

    onDidTriggerButton: Event<QuickInputButton>

    An event signaling when a button was triggered.

    This event fires for buttons stored in the buttons array. This event does not fire for buttons on a QuickPickItem.

    onDidTriggerItemButton: Event<QuickPickItemButtonEvent<T>>

    An event signaling when a button in a particular QuickPickItem was triggered.

    This event does not fire for buttons in the title bar which are part of buttons.

    placeholder: undefined | string

    Optional placeholder text displayed in the filter text box when no value has been entered.

    prompt: undefined | string

    Optional text that provides instructions or context to the user.

    The prompt is displayed below the input box and above the list of items.

    selectedItems: readonly T[]

    Selected items. This can be read and updated by the extension.

    step: undefined | number

    An optional current step count for multi-step input flows.

    title: undefined | string

    An optional title for the input UI.

    totalSteps: undefined | number

    An optional total step count for multi-step input flows.

    value: string

    The current value of the filter text.

    Methods

    • Dispose of this input UI and any associated resources.

      If it is still visible, it is first hidden. After this call the input UI is no longer functional and no additional methods or properties on it should be accessed. Instead a new input UI should be created.

      Returns void