Skip to main content

Interface: CursorInputProps<M>

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/CursorInput/CursorInput.tsx:14

Component props for CursorInput.

Extends

  • ComponentProps

Type Parameters

Type Parameter
M extends MutableSubscribable<any>

Properties

allowBackFill

allowBackFill: boolean

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/CursorInput/CursorInput.tsx:50

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: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/CursorInput/CursorInput.tsx:61

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

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


children?

optional children: DisplayChildren[]

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

The children of the display component.

Inherited from

ComponentProps.children


class?

optional class: string | ToggleableClassNameRecord | SubscribableSet<string>

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/CursorInput/CursorInput.tsx:77

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


digitizeValue()

digitizeValue: (value, setSlotValues, slotValues) => void

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/CursorInput/CursorInput.tsx:38

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

Parameters

ParameterTypeDescription
valueSubscribableType<M>A composite value.
setSlotValuesreadonly (slotValue) => 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


initialEditIndex?

optional initialEditIndex: number | Subscribable<number>

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/CursorInput/CursorInput.tsx:68

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.


parseValue()

parseValue: (slotValues) => SubscribableType<M>

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/CursorInput/CursorInput.tsx:28

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

Parameters

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


ref?

optional ref: NodeReference<any>

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

A reference to the display component.

Inherited from

ComponentProps.ref


renderInactiveValue?

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

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/CursorInput/CursorInput.tsx:74

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: M

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/CursorInput/CursorInput.tsx:20

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.


valueEquals()?

optional valueEquals: (a, b) => boolean

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/CursorInput/CursorInput.tsx:43

A function which checks if two composite values are equal.

Parameters

ParameterType
aSubscribableType<M>
bSubscribableType<M>

Returns

boolean