Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface InputBoxOptions

Options to configure the behavior of the input box UI.

Hierarchy

  • InputBoxOptions

Index

Properties

Optional ignoreFocusOut

ignoreFocusOut: boolean

Set to true to keep the input box open when focus moves to another part of the editor or to another window.

Optional password

password: boolean

Set to true to show a password prompt that will not show the typed value.

Optional placeHolder

placeHolder: string

An optional string to show as place holder in the input box to guide the user what to type.

Optional prompt

prompt: string

The text to display underneath the input box.

Optional validateInput

validateInput: (input: string) => undefined | Promise<undefined | null | string>

An optional function that will be called to validate input and to give a hint to the user.

param

The current value of the input box.

returns

A human readable string which is presented as diagnostic message. Return undefined, or the empty string when 'value' is valid.

Type declaration

    • (input: string): undefined | Promise<undefined | null | string>
    • Parameters

      • input: string

      Returns undefined | Promise<undefined | null | string>

Optional value

value: string

The value to prefill in the input box.

Optional valueSelection

valueSelection: [number, number]

Selection of the prefilled value. Defined as tuple of two number where the first is the inclusive start index and the second the exclusive end index. When undefined the whole word will be selected, when empty (start equals end) only the cursor will be set, otherwise the defined range will be selected.

Methods

Optional onAccept

  • onAccept(): void