Skip to main content

Interface: NumberInputProps

Component props for NumberInput.

Hierarchy

  • ComponentProps

    NumberInputProps

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/NumberInput/NumberInput.tsx:46


canShiftForBackfill

Optional canShiftForBackfill: (char: null | string, slot: CursorInputSlot<number>) => 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 or '0'.

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 or '0'.

Parameters
NameTypeDescription
charnull | stringThe current character in the designated character slot.
slotCursorInputSlot<number>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/NumberInput/NumberInput.tsx:57


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 | SubscribableSet<string>

CSS class(es) to apply to the root of the component.

Defined in

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


digitizeValue

digitizeValue: (value: number, setSignValues: readonly (value: 1 | -1) => void[], setDigitValues: readonly (value: number, unscaled?: boolean) => void[], signValues: readonly (1 | -1)[], digitValues: readonly number[]) => void

A function which assigns values to individual sign and digit slots based on a composite value.

Param

A composite value.

Param

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

Param

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

Param

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

Param

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

Type declaration

▸ (value, setSignValues, setDigitValues, signValues, digitValues): void

A function which assigns values to individual sign and digit slots based on a composite value.

Parameters
NameTypeDescription
valuenumberA composite value.
setSignValuesreadonly (value: 1 | -1) => void[]An array of functions which set the values of the input's individual sign slots. The order of the functions is the same as order of their associated sign slots in the input (from left to right).
setDigitValuesreadonly (value: number, unscaled?: boolean) => void[]An array of functions which set the values of the input's individual digit slots. The order of the functions is the same as order of their associated digit slots in the input (from left to right).
signValuesreadonly (1 | -1)[]An array containing the current values of the input's individual sign slots. The order of the values is the same as the order of the sign slots in the input (from left to right).
digitValuesreadonly number[]An array containing the current values of the input's individual digit slots. The order of the values is the same as the order of the digit 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/NumberInput/NumberInput.tsx:33


initialEditIndex

Optional initialEditIndex: 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/NumberInput/NumberInput.tsx:64


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: number) => 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/NumberInput/NumberInput.tsx:70


value

value: MutableSubscribable<number, number>

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/NumberInput/NumberInput.tsx:19