Class: EditableField<T, V>
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.
Type parameters
Name | Type |
---|---|
T | T |
V | T |
Hierarchy
DisplayField
<T
>↳
EditableField
↳↳
SwitchLabel
↳↳
ToggleLabel
Constructors
constructor
• new EditableField<T
, V
>(page
, options
): EditableField
<T
, V
>
Type parameters
Name | Type |
---|---|
T | T |
V | T |
Parameters
Name | Type |
---|---|
page | AbstractFmcPage <any > |
options | EditableFieldOptions <T > |
Returns
EditableField
<T
, V
>
Inherit Doc
Overrides
Defined in
src/sdk/fmc/components/EditableField.ts:35
Properties
isDisabled
• isDisabled: () => boolean
Type declaration
▸ (): boolean
Returns
boolean
Inherited from
Defined in
src/sdk/fmc/components/FmcComponent.ts:57
options
• Protected
Readonly
options: EditableFieldOptions
<T
>
Inherited from
Defined in
src/sdk/fmc/components/EditableField.ts:37
page
• Protected
page: AbstractFmcPage
<any
>
Inherited from
Defined in
src/sdk/fmc/components/EditableField.ts:36
value
• Protected
value: null
| T
= null
Inherited from
Defined in
src/sdk/fmc/components/DisplayField.ts:30
valueChanged
• Protected
Readonly
valueChanged: SubEvent
<EditableField
<T
, V
>, V
>
Defined in
src/sdk/fmc/components/EditableField.ts:32
Accessors
rawValue
• get
rawValue(): null
| T
Gets the raw value of this display field
Returns
null
| T
the value
Inherited from
DisplayField.rawValue
Defined in
src/sdk/fmc/components/DisplayField.ts:36
Methods
bind
▸ bind(subscribable
): this
Binds the input field to a mutable subscribable.
Parameters
Name | Type | Description |
---|---|---|
subscribable | MutableSubscribable <T , V > | Subscribable <T > | the mutable subscribable |
Returns
this
the instance of this EditableField
Overrides
Defined in
src/sdk/fmc/components/EditableField.ts:47
bindConsumer
▸ bindConsumer(consumer
, modifier
): this
Binds the input field to a Consumer.
Parameters
Name | Type | Description |
---|---|---|
consumer | Consumer <T > | the consumer to bind to (get) |
modifier | (value : V ) => void | the modifier to use when the value is modified (set) |
Returns
this
the instance of this EditableField
Defined in
src/sdk/fmc/components/EditableField.ts:63
bindSource
▸ bindSource(source
): this
Binds the input field to a data interface.
Parameters
Name | Type | Description |
---|---|---|
source | DataInterface <T , V > | the data interface |
Returns
this
the instance of this EditableField
Defined in
src/sdk/fmc/components/EditableField.ts:72
getOptions
▸ getOptions(): DisplayFieldOptions
<T
>
Returns the component's options
Returns
The options.
Inherited from
Defined in
src/sdk/fmc/components/FmcComponent.ts:124
handleSelectKey
▸ handleSelectKey(event
): Promise
<string
| boolean
>
Parameters
Name | Type |
---|---|
event | LineSelectKeyEvent |
Returns
Promise
<string
| boolean
>
Inherit Doc
Inherited from
Defined in
src/sdk/fmc/components/FmcComponent.ts:80
invalidate
▸ invalidate(): void
Invalidates the component and queues a re-render if one is not already queued
Returns
void
Inherited from
Defined in
src/sdk/fmc/components/FmcComponent.ts:69
onHandleSelectKey
▸ onHandleSelectKey(event
): Promise
<string
| boolean
>
Parameters
Name | Type |
---|---|
event | LineSelectKeyEvent |
Returns
Promise
<string
| boolean
>
Inherit Doc
Overrides
DisplayField.onHandleSelectKey
Defined in
src/sdk/fmc/components/EditableField.ts:85
render
▸ render(): FmcFormatterOutput
Renders the FMC component into an FmcRenderTemplateRow
Returns
Inherited from
Defined in
src/sdk/fmc/components/DisplayField.ts:74
takeValue
▸ takeValue(value
, shouldInvalidate?
): void
Takes an input value, displays it and stores it
Parameters
Name | Type | Default value | Description |
---|---|---|---|
value | null | T | undefined | the new input value |
shouldInvalidate | boolean | false | whether or not to invalidate the page |
Returns
void
Inherited from
Defined in
src/sdk/fmc/components/DisplayField.ts:60