Skip to main content

Class: TextInputField<T, V>

Defined in: src/sdk/fmc/components/TextInputField.ts:58

An FmcComponent for displaying and accepting new values according to a validator and formatter.

deleteAllowed

This class deals with LSK presses that have the DELETE flag active using a default implementation of FmcComponentOptions.onDelete, which checks options.deleteAllowed - if true or not set,the onValidLskInput subject is set to null - if false, the "INVALID DELETE" scratchpad message is returned and handled by FmcComponent.handleSelectKey.

onModified

This class also introduces another LSK handler, InputFieldOptions.onModified, which is run after a value has been validated (it is not called for invalid values) and applies return value logic. This runs after the flow described for FmcComponent.

Extends

Type Parameters

Type ParameterDefault type
Tstring
VT

Constructors

Constructor

new TextInputField<T, V>(page, options): TextInputField<T, V>

Defined in: src/sdk/fmc/components/TextInputField.ts:61

Parameters

ParameterType
pageAbstractFmcPage
optionsTextInputFieldOptions<T, V>

Returns

TextInputField<T, V>

Inherit Doc

Overrides

EditableField.constructor

Properties

isDisabled()

isDisabled: () => boolean

Defined in: src/sdk/fmc/components/FmcComponent.ts:57

Returns

boolean

Inherited from

EditableField.isDisabled


options

readonly options: TextInputFieldOptions<T, V>

Defined in: src/sdk/fmc/components/TextInputField.ts:63

Inherited from

EditableField.options


page

protected page: AbstractFmcPage

Defined in: src/sdk/fmc/components/EditableField.ts:36

Inherited from

EditableField.page


value

protected value: null | T = null

Defined in: src/sdk/fmc/components/DisplayField.ts:30

Inherited from

EditableField.value


valueChanged

protected readonly valueChanged: SubEvent<EditableField<T, V>, V>

Defined in: src/sdk/fmc/components/EditableField.ts:32

Inherited from

EditableField.valueChanged

Accessors

rawValue

Get Signature

get protected rawValue(): null | T

Defined in: src/sdk/fmc/components/DisplayField.ts:36

Gets the raw value of this display field

Returns

null | T

the value

Inherited from

EditableField.rawValue

Methods

bind()

bind(subscribable): this

Defined in: src/sdk/fmc/components/EditableField.ts:47

Binds the input field to a mutable subscribable.

Parameters

ParameterTypeDescription
subscribableMutableSubscribable<T, V> | Subscribable<T>the mutable subscribable

Returns

this

the instance of this EditableField

Inherited from

EditableField.bind


bindConsumer()

bindConsumer(consumer, modifier): this

Defined in: src/sdk/fmc/components/EditableField.ts:63

Binds the input field to a Consumer.

Parameters

ParameterTypeDescription
consumerConsumer<T>the consumer to bind to (get)
modifier(value) => voidthe modifier to use when the value is modified (set)

Returns

this

the instance of this EditableField

Inherited from

EditableField.bindConsumer


bindSource()

bindSource(source): this

Defined in: src/sdk/fmc/components/EditableField.ts:72

Binds the input field to a data interface.

Parameters

ParameterTypeDescription
sourceDataInterface<T, V>the data interface

Returns

this

the instance of this EditableField

Inherited from

EditableField.bindSource


getOptions()

getOptions(): DisplayFieldOptions

Defined in: src/sdk/fmc/components/FmcComponent.ts:124

Returns the component's options

Returns

DisplayFieldOptions

The options.

Inherited from

EditableField.getOptions


handleSelectKey()

handleSelectKey(event): Promise<string | boolean>

Defined in: src/sdk/fmc/components/FmcComponent.ts:80

Parameters

ParameterType
eventLineSelectKeyEvent

Returns

Promise<string | boolean>

Inherit Doc

Inherited from

EditableField.handleSelectKey


invalidate()

protected invalidate(): void

Defined in: src/sdk/fmc/components/FmcComponent.ts:69

Invalidates the component and queues a re-render if one is not already queued

Returns

void

Inherited from

EditableField.invalidate


onHandleSelectKey()

protected onHandleSelectKey(event): Promise<string | boolean>

Defined in: src/sdk/fmc/components/TextInputField.ts:96

Parameters

ParameterType
eventLineSelectKeyEvent

Returns

Promise<string | boolean>

Inherit Doc

Overrides

EditableField.onHandleSelectKey


render()

render(): FmcFormatterOutput

Defined in: src/sdk/fmc/components/DisplayField.ts:74

Renders the FMC component into an FmcRenderTemplateRow

Returns

FmcFormatterOutput

Inherited from

EditableField.render


takeTextInput()

takeTextInput(input): Promise<string | boolean>

Defined in: src/sdk/fmc/components/TextInputField.ts:91

Allows text input to be programmatically sent to the field.

Parameters

ParameterTypeDescription
inputstringthe text input

Returns

Promise<string | boolean>

a Promise that resolves to a boolean or string


takeValue()

takeValue(value, shouldInvalidate): void

Defined in: src/sdk/fmc/components/DisplayField.ts:60

Takes an input value, displays it and stores it

Parameters

ParameterTypeDefault valueDescription
valuenull | Tundefinedthe new input value
shouldInvalidatebooleanfalsewhether or not to invalidate the page

Returns

void

Inherited from

EditableField.takeValue