Skip to main content

Interface: CustomPick<T>

Defined in: packages/extension-api/src/extension-api.d.ts:1729

A concrete CustomPick to let the user pick an item from a list of items of type T. The items are rendered using a custom UI.

Type Parameters​

T​

T extends CustomPickItem

Properties​

canSelectMany​

canSelectMany: boolean

Defined in: packages/extension-api/src/extension-api.d.ts:1749

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


description?​

optional description?: string

Defined in: packages/extension-api/src/extension-api.d.ts:1737

An optional human-readable string which is rendered less prominent in a separate line.


hideItemSections​

hideItemSections: boolean

Defined in: packages/extension-api/src/extension-api.d.ts:1755

If the additional sections of an item should be hidden by default when the dialog opens up. The user can still open them by clicking on the 'show more' button. Defaults to false.


icon?​

optional icon?: string | { dark: string; light: string; }

Defined in: packages/extension-api/src/extension-api.d.ts:1741

An optional base64 PNG image


items​

items: T[]

Defined in: packages/extension-api/src/extension-api.d.ts:1745

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


minHeight?​

optional minHeight?: string

Defined in: packages/extension-api/src/extension-api.d.ts:1761

When a custompick is closed (the sections are hidden) it is possible to set a minimum height so to force different items to have the same height. It must be set using pixels or percentage (e.g 100px or 50%) Use it carefully as it could break the layout.


onDidConfirmSelection​

readonly onDidConfirmSelection: Event<number[]>

Defined in: packages/extension-api/src/extension-api.d.ts:1765

An event signaling when the user indicated confirmation of the selected item(s) index(es).


onDidHide​

readonly onDidHide: Event<void>

Defined in: packages/extension-api/src/extension-api.d.ts:1769

An event signaling when this input UI is hidden.


title?​

optional title?: string

Defined in: packages/extension-api/src/extension-api.d.ts:1733

An optional human-readable string which is rendered prominent.

Methods​

dispose()​

dispose(): void

Defined in: packages/extension-api/src/extension-api.d.ts:1783

Dispose and free associated resources. Call CustomPick.hide.

Returns​

void


hide()​

hide(): void

Defined in: packages/extension-api/src/extension-api.d.ts:1777

Hides the custom pick.

Returns​

void


show()​

show(): void

Defined in: packages/extension-api/src/extension-api.d.ts:1773

Shows the custom pick.

Returns​

void