Interface: TextInputFieldOptions<T, V>
Input field options
Type parameters
Name |
---|
T |
V |
Hierarchy
↳
TextInputFieldOptions
Properties
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
clearScratchpadOnValueAccepted
• Optional
clearScratchpadOnValueAccepted: boolean
Whether the scratchpad is cleared when a new value is accepted. true
by default.
Defined in
src/sdk/fmc/components/TextInputField.ts:23
deleteAllowed
• Optional
deleteAllowed: boolean
Whether CLR DEL lsk events push a null value
Defined in
src/sdk/fmc/components/TextInputField.ts:18
disabled
• Optional
disabled: boolean
| () => boolean
Disables this component, not handling any lsk events.
Inherited from
Defined in
src/sdk/fmc/components/FmcComponent.ts:10
formatter
• formatter: FmcFormatter
<T
> & Validator
<V
>
Validator object
Overrides
EditableFieldOptions.formatter
Defined in
src/sdk/fmc/components/TextInputField.ts:13
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 calledfalse
-> the handler is not considered to have handled the call, and the next handlers will be calledstring
-> 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 calledfalse
-> the handler is not considered to have handled the call, and the next handlers will be calledstring
-> the value is shown in the scratchpad, and the handler is considered to have handled the call
Returns
Promise
<string
| boolean
>
Inherited from
Defined in
src/sdk/fmc/components/FmcComponent.ts:41
onModified
• Optional
onModified: (newValue
: V
) => Promise
<string
| boolean
>
Optional callback fired when the value is about to be modified. This is only called when a value is successfully validated.
This should be used when there is no appropriate way of using a modifiable data source to accept modifications from this input field.
An example of this is a complex process like inserting a flight plan leg, or something calling a distant modification process with a very indirect relationship to the input data.
If the return value is:
true
-> the handler is considered to have handled the call, and any bound data is not modified.false
-> the handler is not considered to have handled the call itself, and any bound data is modified.string
-> the value is shown in the scratchpad, and the handler is considered to have handled the call.- error -> the error is thrown and handled by
FmcScreen::handleLineSelectKey
Type declaration
▸ (newValue
): Promise
<string
| boolean
>
Optional callback fired when the value is about to be modified. This is only called when a value is successfully validated.
This should be used when there is no appropriate way of using a modifiable data source to accept modifications from this input field.
An example of this is a complex process like inserting a flight plan leg, or something calling a distant modification process with a very indirect relationship to the input data.
If the return value is:
true
-> the handler is considered to have handled the call, and any bound data is not modified.false
-> the handler is not considered to have handled the call itself, and any bound data is modified.string
-> the value is shown in the scratchpad, and the handler is considered to have handled the call.- error -> the error is thrown and handled by
FmcScreen::handleLineSelectKey
Parameters
Name | Type |
---|---|
newValue | V |
Returns
Promise
<string
| boolean
>
Defined in
src/sdk/fmc/components/TextInputField.ts:39
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 calledfalse
-> the handler is not considered to have handled the call, and the next handlers will be calledstring
-> 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 calledfalse
-> the handler is not considered to have handled the call, and the next handlers will be calledstring
-> the value is shown in the scratchpad, and the handler is considered to have handled the call
Parameters
Name | Type |
---|---|
scratchpadContents | string |
Returns
Promise
<string
| boolean
>
Inherited from
EditableFieldOptions.onSelected
Defined in
src/sdk/fmc/components/FmcComponent.ts:26
prefix
• Optional
prefix: string
Text shown before the value (can be used for start indentation)
Inherited from
Defined in
src/sdk/fmc/components/DisplayField.ts:17
style
• Optional
style: string
| (value
: null
| T
) => string
The style to apply to the value. MUST BE WRAPPED IN SQUARE BRACKETS.
Inherited from
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
Defined in
src/sdk/fmc/components/DisplayField.ts:20