Skip to main content

Class: DigitInputSlot

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/NumberInput/DigitInputSlot.tsx:78

A cursor input slot which allows the user to select a numeric digit. Digits are integers, but are not necessarily constrained to be in the range [0, 9].

Extends​

Constructors​

Constructor​

new DigitInputSlot(props): DigitInputSlot

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

Creates an instance of a DisplayComponent.

Parameters​

ParameterTypeDescription
propsDigitInputSlotPropsThe propertis of the component.

Returns​

DigitInputSlot

Inherited from​

DisplayComponent.constructor

Properties​

context?​

optional context: [] = undefined

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

The context on this component, if any.

Inherited from​

DisplayComponent.context


contextType?​

readonly optional contextType: readonly [] = undefined

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

The type of context for this component, if any.

Inherited from​

DisplayComponent.contextType


props​

props: DigitInputSlotProps & ComponentProps

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

The properties of the component.

Inherited from​

DisplayComponent.props

Accessors​

value​

Get Signature​

get value(): Subscribable<number>

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/NumberInput/DigitInputSlot.tsx:137

The value bound to this slot.

Returns​

Subscribable<number>

Methods​

decrementValue()​

decrementValue(): boolean

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/NumberInput/DigitInputSlot.tsx:190

Decrements this slot's value.

Returns​

boolean

Whether the decrement operation was accepted.


destroy()​

destroy(): void

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/NumberInput/DigitInputSlot.tsx:333

Destroys this component.

Returns​

void

Overrides​

DisplayComponent.destroy


getContext()​

protected getContext(context): never

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

Gets a context data subscription from the context collection.

Parameters​

ParameterTypeDescription
contextneverThe context to get the subscription for.

Returns​

never

The requested context.

Throws​

An error if no data for the specified context type could be found.

Inherited from​

DisplayComponent.getContext


incrementValue()​

incrementValue(): boolean

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/NumberInput/DigitInputSlot.tsx:182

Increments this slot's value.

Returns​

boolean

Whether the increment operation was accepted.


onAfterRender()​

onAfterRender(): void

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/NumberInput/DigitInputSlot.tsx:147

A callback that is called after the component is rendered.

Returns​

void

Overrides​

DisplayComponent.onAfterRender


onBeforeRender()​

onBeforeRender(): void

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

A callback that is called before the component is rendered.

Returns​

void

Inherited from​

DisplayComponent.onBeforeRender


render()​

render(): VNode

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/NumberInput/DigitInputSlot.tsx:301

Renders the component.

Returns​

VNode

A JSX element to be rendered.

Overrides​

DisplayComponent.render


setChar()​

setChar(index, char, force?): boolean

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/NumberInput/DigitInputSlot.tsx:201

Sets the value of one of this slot's characters.

Parameters​

ParameterTypeDescription
indexnumberThe index of the character to set.
charstring | nullThe value to set.
force?booleanWhether to force the character to accept a value that would normally be invalid. Defaults to false.

Returns​

boolean

Whether the operation was accepted.


setUnscaledValue()​

setUnscaledValue(unscaled): number

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/NumberInput/DigitInputSlot.tsx:174

Sets the unscaled value of this slot. The unscaled value of this slot after the operation is complete may be different from the requested value, depending on whether this slot can accurately represent the requested value.

Parameters​

ParameterTypeDescription
unscalednumberThe new unscaled value.

Returns​

number

The new unscaled value of this slot after the operation is complete.


setValue()​

setValue(value): number

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/NumberInput/DigitInputSlot.tsx:164

Sets the value of this slot. As part of the operation, all of this slot's characters will be set to non-null representations of the new value, if possible. The value of this slot after the operation is complete may differ from the requested value depending on whether the requested value can be accurately represented by this slot.

Parameters​

ParameterTypeDescription
valuenumberThe new value.

Returns​

number

The value of this slot after the operation is complete.