Skip to main content

Interface: CursorInputProps<M>

Component props for CursorInput.

Type parameters

NameType
Mextends MutableSubscribable<any>

Hierarchy

  • ComponentProps

    CursorInputProps

Properties

allowBackFill

allowBackFill: boolean

Whether to allow backfill of character positions. If true, when directly inserting values into the last character position, any existing values will be shifted to the left as long as there are empty positions to accommodate them.

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/CursorInput/CursorInput.tsx:50


canShiftForBackfill

Optional canShiftForBackfill: (char: null | string, slot: CursorInputSlot<any>) => boolean

Checks whether the designated character slot into which characters will shift during a backfill operation can accept shifted characters. Ignored if allowBackFill is false. If not defined, the designated character slot will accept shifted characters if and only if its current character value is null.

Param

The current character in the designated character slot.

Param

The designated character slot's parent input slot.

Type declaration

▸ (char, slot): boolean

Checks whether the designated character slot into which characters will shift during a backfill operation can accept shifted characters. Ignored if allowBackFill is false. If not defined, the designated character slot will accept shifted characters if and only if its current character value is null.

Parameters
NameTypeDescription
charnull | stringThe current character in the designated character slot.
slotCursorInputSlot<any>The designated character slot's parent input slot.
Returns

boolean

Whether the designated character slot into which characters will shift during a backfill operation can accept shifted characters.

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/CursorInput/CursorInput.tsx:61


children

Optional children: DisplayChildren[]

The children of the display component.

Inherited from

ComponentProps.children

Defined in

src/sdk/components/FSComponent.ts:122


class

Optional class: string | ToggleableClassNameRecord | SubscribableSet<string>

CSS class(es) to apply to the component's root element.

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/CursorInput/CursorInput.tsx:77


digitizeValue

digitizeValue: (value: SubscribableType<M>, setSlotValues: readonly (slotValue: any) => void[], slotValues: readonly any[]) => void

A function which assigns values to the input's individual slots based on a composite value.

Param

A composite value.

Param

An array of functions which set the values of the input's individual slots. The order of the functions is the same as the order of the their associated slots in the input (from left to right).

Param

An array containing the current values of the input's individual slots. The order of the values is the same as the order of the slots in the input (from left to right).

Type declaration

▸ (value, setSlotValues, slotValues): void

A function which assigns values to the input's individual slots based on a composite value.

Parameters
NameTypeDescription
valueSubscribableType<M>A composite value.
setSlotValuesreadonly (slotValue: any) => void[]An array of functions which set the values of the input's individual slots. The order of the functions is the same as the order of the their associated slots in the input (from left to right).
slotValuesreadonly any[]An array containing the current values of the input's individual slots. The order of the values is the same as the order of the slots in the input (from left to right).
Returns

void

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/CursorInput/CursorInput.tsx:38


initialEditIndex

Optional initialEditIndex: number | Subscribable<number>

The character index to initially select with the cursor when editing is activated. If not defined, the initial index will default to the last index if backfill is allowed and cursor selection is in per-character mode, or the first index (0) otherwise.

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/CursorInput/CursorInput.tsx:68


parseValue

parseValue: (slotValues: readonly any[]) => SubscribableType<M>

A function which parses the input's individual slot values to generate a composite value.

Param

An array of the bound values of the input's individual slots. The order of the values is the same as the order of the slots in the input (from left to right).

Type declaration

▸ (slotValues): SubscribableType<M>

A function which parses the input's individual slot values to generate a composite value.

Parameters
NameTypeDescription
slotValuesreadonly any[]An array of the bound values of the input's individual slots. The order of the values is the same as the order of the slots in the input (from left to right).
Returns

SubscribableType<M>

The composite value parsed from the specified slot values.

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/CursorInput/CursorInput.tsx:28


ref

Optional ref: NodeReference<any>

A reference to the display component.

Inherited from

ComponentProps.ref

Defined in

src/sdk/components/FSComponent.ts:125


renderInactiveValue

Optional renderInactiveValue: VNode | (value: SubscribableType<M>) => string | VNode

A function or VNode which renders the input's value when editing is not active. If defined, the rendered inactive value replaces all rendered child components when editing is not active.

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/CursorInput/CursorInput.tsx:74


value

value: M

A mutable subscribable to bind to the input's composite value. The binding is one-way: changes in the input value will be piped to the subscribable, but changes in the subscribable's value will not trigger any changes to the input.

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/CursorInput/CursorInput.tsx:20


valueEquals

Optional valueEquals: (a: SubscribableType<M>, b: SubscribableType<M>) => boolean

A function which checks if two composite values are equal.

Type declaration

▸ (a, b): boolean

A function which checks if two composite values are equal.

Parameters
NameType
aSubscribableType<M>
bSubscribableType<M>
Returns

boolean

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/CursorInput/CursorInput.tsx:43