Interface QuickPickItem

Represents an item that can be selected from a list of items.

interface QuickPickItem {
    alwaysShow?: boolean;
    buttons?: readonly QuickInputButton[];
    description?: string;
    detail?: string;
    iconPath?: IconPath;
    kind?: QuickPickItemKind;
    label: string;
    picked?: boolean;
}

Properties

alwaysShow?: boolean

Always show this item.

Note: this property is ignored when kind is set to QuickPickItemKind.Separator

buttons?: readonly QuickInputButton[]

Optional buttons that will be rendered on this particular item. These buttons will trigger an QuickPickItemButtonEvent when clicked. Buttons are only rendered when using a quickpick created by the () API. Buttons are not rendered when using the () API.

Note: this property is ignored when kind is set to QuickPickItemKind.Separator

description?: string

A human-readable string which is rendered less prominent in the same line. Supports rendering of theme icons via the $(<name>)-syntax.

Note: this property is ignored when kind is set to QuickPickItemKind.Separator

detail?: string

A human-readable string which is rendered less prominent in a separate line. Supports rendering of theme icons via the $(<name>)-syntax.

Note: this property is ignored when kind is set to QuickPickItemKind.Separator

iconPath?: IconPath

The icon path or ThemeIcon for the QuickPickItem.

Defaults to QuickPickItemKind.Default. If set to QUickPickItemKind.Separator, the item will not be displayed as a row but only as a separator, and all fields other than label will be ignored.

label: string

A human-readable string which is rendered prominent. Supports rendering of theme icons via the $(<name>)-syntax.

picked?: boolean

Optional flag indicating if this item is picked initially. This is only honored when using the () API. To do the same thing with the () API, simply set the QuickPick.selectedItems to the items you want picked initially. (Note: This is only honored when the picker allows multiple selections.)

See

QuickPickOptions.canPickMany

Note: this property is ignored when kind is set to QuickPickItemKind.Separator