Skip to main content

Abstract Class: EditableField<T, V>

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

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, EditableFieldOptions.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​

Extended by​

Type Parameters​

Type ParameterDefault type
T-
VT

Constructors​

Constructor​

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

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

Parameters​

ParameterType
pageAbstractFmcPage
optionsEditableFieldOptions<T>

Returns​

EditableField<T, V>

Inherit Doc​

Overrides​

DisplayField.constructor

Properties​

isDisabled()​

isDisabled: () => boolean

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

Returns​

boolean

Inherited from​

DisplayField.isDisabled


options​

protected readonly options: EditableFieldOptions<T>

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

Inherited from​

DisplayField.options


page​

protected page: AbstractFmcPage

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

Inherited from​

DisplayField.page


value​

protected value: null | T = null

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

Inherited from​

DisplayField.value


valueChanged​

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

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

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​

DisplayField.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

Overrides​

DisplayField.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


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


getOptions()​

getOptions(): DisplayFieldOptions

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

Returns the component's options

Returns​

DisplayFieldOptions

The options.

Inherited from​

DisplayField.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​

DisplayField.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​

DisplayField.invalidate


onHandleSelectKey()​

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

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

Parameters​

ParameterType
eventLineSelectKeyEvent

Returns​

Promise<string | boolean>

Inherit Doc​

Overrides​

DisplayField.onHandleSelectKey


render()​

render(): FmcFormatterOutput

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

Renders the FMC component into an FmcRenderTemplateRow

Returns​

FmcFormatterOutput

Inherited from​

DisplayField.render


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​

DisplayField.takeValue