Skip to main content

Interface: SwitchLabelOptions

Switch label options

Hierarchy

Properties

activeStyle

Optional activeStyle: string

Style class applied to the active option string only

Defined in

src/sdk/fmc/components/SwitchLabel.ts:13


caret

Optional caret: "left" | "none" | "right"

The position of the caret to display. Defaults to none.

Defined in

src/sdk/fmc/components/SwitchLabel.ts:16


clearScratchpadOnSelectedHandled

Optional clearScratchpadOnSelectedHandled: boolean

Whether to clear the s-pad when onSelected returns a string or true. Defaults to true.

Inherited from

EditableFieldOptions.clearScratchpadOnSelectedHandled

Defined in

src/sdk/fmc/components/FmcComponent.ts:31


disabled

Optional disabled: boolean | () => boolean

Disables this component, not handling any lsk events.

Inherited from

EditableFieldOptions.disabled

Defined in

src/sdk/fmc/components/FmcComponent.ts:10


formatter

formatter: FmcComponentFormatter<number>

Formatter object

Inherited from

EditableFieldOptions.formatter

Defined in

src/sdk/fmc/components/DisplayField.ts:14


onDelete

Optional onDelete: () => Promise<string | boolean>

Handler for an LSK pressed in DELETE mode

If the return value is:

  • true -> the handler is considered to have handled the call, and no further handlers will be called
  • false -> the handler is not considered to have handled the call, and the next handlers will be called
  • string -> the value is shown in the scratchpad, and the handler is considered to have handled the call

Type declaration

▸ (): Promise<string | boolean>

Handler for an LSK pressed in DELETE mode

If the return value is:

  • true -> the handler is considered to have handled the call, and no further handlers will be called
  • false -> the handler is not considered to have handled the call, and the next handlers will be called
  • string -> the value is shown in the scratchpad, and the handler is considered to have handled the call
Returns

Promise<string | boolean>

Inherited from

EditableFieldOptions.onDelete

Defined in

src/sdk/fmc/components/FmcComponent.ts:41


onSelected

Optional onSelected: (scratchpadContents: string) => Promise<string | boolean>

Handler for an LSK pressed where the component is. This is the second priority in terms of handling, after the FmcPage and before the component class onLsk function.

This should be used in either of those two cases:

  • the component does not take user input but has LSK interactivity
  • the component takes user input, but it is not validated (instead of using an InputField)

If the return value is:

  • true -> the handler is considered to have handled the call, and no further handlers will be called
  • false -> the handler is not considered to have handled the call, and the next handlers will be called
  • string -> the value is shown in the scratchpad, and the handler is considered to have handled the call

Type declaration

▸ (scratchpadContents): Promise<string | boolean>

Handler for an LSK pressed where the component is. This is the second priority in terms of handling, after the FmcPage and before the component class onLsk function.

This should be used in either of those two cases:

  • the component does not take user input but has LSK interactivity
  • the component takes user input, but it is not validated (instead of using an InputField)

If the return value is:

  • true -> the handler is considered to have handled the call, and no further handlers will be called
  • false -> the handler is not considered to have handled the call, and the next handlers will be called
  • string -> the value is shown in the scratchpad, and the handler is considered to have handled the call
Parameters
NameType
scratchpadContentsstring
Returns

Promise<string | boolean>

Inherited from

EditableFieldOptions.onSelected

Defined in

src/sdk/fmc/components/FmcComponent.ts:26


optionStrings

optionStrings: readonly string[]

String names of possible options, in order

Defined in

src/sdk/fmc/components/SwitchLabel.ts:10


prefix

Optional prefix: string

Text shown before the value (can be used for start indentation)

Inherited from

EditableFieldOptions.prefix

Defined in

src/sdk/fmc/components/DisplayField.ts:17


separator

Optional separator: "slash" | "arrows"

The separator to show between the options, arrows are highlighted when next to active option

Defined in

src/sdk/fmc/components/SwitchLabel.ts:19


style

Optional style: string | (value: null | number) => string

The style to apply to the value. MUST BE WRAPPED IN SQUARE BRACKETS.

Inherited from

EditableFieldOptions.style

Defined in

src/sdk/fmc/components/DisplayField.ts:23


suffix

Optional suffix: string

Text shown after the value (can be used for end indentation)

Inherited from

EditableFieldOptions.suffix

Defined in

src/sdk/fmc/components/DisplayField.ts:20