Skip to main content

Interface: NumberInputProps

Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/NumberInput/NumberInput.tsx:13

Component props for NumberInput.

Extends

  • ComponentProps

Properties

allowBackFill

allowBackFill: boolean

Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/NumberInput/NumberInput.tsx:46

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.


canShiftForBackfill()?

optional canShiftForBackfill: (char, slot) => boolean

Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/NumberInput/NumberInput.tsx:57

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

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


children?

optional children: DisplayChildren[]

Defined in: sdk/components/FSComponent.ts:122

The children of the display component.

Inherited from

ComponentProps.children


class?

optional class: string | ToggleableClassNameRecord | SubscribableSet<string>

Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/NumberInput/NumberInput.tsx:73

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


digitizeValue()

digitizeValue: (value, setSignValues, setDigitValues, signValues, digitValues) => void

Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/NumberInput/NumberInput.tsx:33

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

Parameters

ParameterTypeDescription
valuenumberA composite value.
setSignValuesreadonly (value) => 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, unscaled?) => 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


initialEditIndex?

optional initialEditIndex: number

Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/NumberInput/NumberInput.tsx:64

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.


ref?

optional ref: NodeReference<any>

Defined in: sdk/components/FSComponent.ts:125

A reference to the display component.

Inherited from

ComponentProps.ref


renderInactiveValue?

optional renderInactiveValue: VNode | (value) => string | VNode

Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/NumberInput/NumberInput.tsx:70

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.


value

value: MutableSubscribable<number>

Defined in: workingtitle-instruments-g3000/html_ui/GTC/Components/NumberInput/NumberInput.tsx:19

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.