Options
All
  • Public
  • Public/Protected
  • All
Menu

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.

Type parameters

层级

索引

Properties(21)

title

title: undefined | string

An optional title.

step

step: undefined | number

An optional current step count.

totalSteps

totalSteps: undefined | number

An optional total step count.

enabled

enabled: boolean

If the UI should allow for user input. Defaults to true.

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

busy

busy: boolean

If the UI should show a progress indicator. Defaults to false.

Change this to true, e.g., while loading more data or validating user input.

ignoreFocusOut

ignoreFocusOut: boolean

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

onDidHide

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 QuickInput.onDidHide. (Examples include: an explicit call to QuickInput.hide, the user pressing Esc, some other input UI opening, etc.)

value

value: string

Current value of the filter text.

placeholder

placeholder: undefined | string

Optional placeholder in the filter text.

Readonly onDidChangeValue

onDidChangeValue: Event<string>

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

Readonly onDidAccept

onDidAccept: Event<void>

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

buttons

buttons: readonly QuickInputButton[]

Buttons for actions in the UI.

Readonly onDidTriggerButton

onDidTriggerButton: Event<QuickInputButton>

An event signaling when a button was triggered.

items

items: readonly T[]

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

canSelectMany

canSelectMany: boolean

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

matchOnDescription

matchOnDescription: boolean

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

matchOnDetail

matchOnDetail: boolean

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

activeItems

activeItems: readonly T[]

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

Readonly onDidChangeActive

onDidChangeActive: Event<readonly T[]>

An event signaling when the active items have changed.

selectedItems

selectedItems: readonly T[]

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

Readonly onDidChangeSelection

onDidChangeSelection: Event<readonly T[]>

An event signaling when the selected items have changed.

Methods(3)

show

  • show(): void

hide

  • hide(): void

dispose

  • dispose(): void
  • 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

友链:VS Code 中文文档 | VS Code 官网文档 | VS Code 扩展市场

Generated by TypeDoc. Maintained by 洛竹