Skip to main content

Class: InputBox<T>

Defined in: workingtitle-instruments-epic2/shared/Components/Inputs/InputBox.tsx:89

The InputBox component.

Extends

Extended by

Type Parameters

Type Parameter
T extends number | string

Constructors

Constructor

new InputBox<T>(props): InputBox<T>

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

Creates an instance of a DisplayComponent.

Parameters

ParameterTypeDescription
propsInputBoxPropsThe propertis of the component.

Returns

InputBox<T>

Inherited from

DisplayComponent.constructor

Properties

_isActive

protected readonly _isActive: Subject<boolean>

Defined in: workingtitle-instruments-epic2/shared/Components/Inputs/InputBox.tsx:95


context?

optional context: [] = undefined

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

The context on this component, if any.

Inherited from

DisplayComponent.context


contextType?

readonly optional contextType: readonly [] = undefined

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

The type of context for this component, if any.

Inherited from

DisplayComponent.contextType


dragRef

readonly dragRef: NodeReference<HTMLElement>

Defined in: workingtitle-instruments-epic2/shared/Components/Inputs/InputBox.tsx:111


inputId

readonly inputId: string

Defined in: workingtitle-instruments-epic2/shared/Components/Inputs/InputBox.tsx:112


inputRef

readonly inputRef: NodeReference<HTMLInputElement>

Defined in: workingtitle-instruments-epic2/shared/Components/Inputs/InputBox.tsx:109


isActive

readonly isActive: Subscribable<boolean>

Defined in: workingtitle-instruments-epic2/shared/Components/Inputs/InputBox.tsx:98


isCapturing

readonly isCapturing: Subscribable<boolean>

Defined in: workingtitle-instruments-epic2/shared/Components/Inputs/InputBox.tsx:99


isEnabled

readonly isEnabled: Subscribable<boolean>

Defined in: workingtitle-instruments-epic2/shared/Components/Inputs/InputBox.tsx:93


isError

readonly isError: Subscribable<boolean>

Defined in: workingtitle-instruments-epic2/shared/Components/Inputs/InputBox.tsx:97


isReadOnly

protected readonly isReadOnly: boolean

Defined in: workingtitle-instruments-epic2/shared/Components/Inputs/InputBox.tsx:101


props

props: InputBoxProps<T> & ComponentProps

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

The properties of the component.

Inherited from

DisplayComponent.props


subscriptions

protected subscriptions: Subscription[] = []

Defined in: workingtitle-instruments-epic2/shared/Components/Inputs/InputBox.tsx:121

Methods

applyDragBounds()

applyDragBounds(value): number

Defined in: workingtitle-instruments-epic2/shared/Components/Inputs/InputBox.tsx:257

Restrict upper/lower bounds of input

Parameters

ParameterTypeDescription
valuenumbernumber to check

Returns

number

number


destroy()

destroy(): void

Defined in: workingtitle-instruments-epic2/shared/Components/Inputs/InputBox.tsx:462

Destroys this component.

Returns

void

Overrides

DisplayComponent.destroy


getContext()

protected getContext(context): never

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

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


handleError()

handleError(): void

Defined in: workingtitle-instruments-epic2/shared/Components/Inputs/InputBox.tsx:404

Handles any errors

Returns

void


handleInput()

protected readonly handleInput(): void

Defined in: workingtitle-instruments-epic2/shared/Components/Inputs/InputBox.tsx:399

Handles the input event from the input element.

Returns

void


isValidator()

protected isValidator(formatter): formatter is Formatter<T, string> | Validator<T>

Defined in: workingtitle-instruments-epic2/shared/Components/Inputs/InputBox.tsx:330

Checks if a formatter is also a validator.

Parameters

ParameterTypeDescription
formatterunknownThe formatter to check.

Returns

formatter is Formatter<T, string> | Validator<T>

true if the formatter is also a validator.


onAfterRender()

onAfterRender(): void

Defined in: workingtitle-instruments-epic2/shared/Components/Inputs/InputBox.tsx:124

A callback that is called after the component is rendered.

Returns

void

Overrides

DisplayComponent.onAfterRender


onBeforeRender()

onBeforeRender(): void

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

A callback that is called before the component is rendered.

Returns

void

Inherited from

DisplayComponent.onBeforeRender


onDestroy()

onDestroy(): void

Defined in: workingtitle-instruments-epic2/shared/Components/Inputs/InputBox.tsx:412

Returns

void

Inherit Doc


onInputBlur()

protected onInputBlur(): Promise<void>

Defined in: workingtitle-instruments-epic2/shared/Components/Inputs/InputBox.tsx:347

Method to handle on input blur

Returns

Promise<void>


onInputFocus()

protected onInputFocus(e): void

Defined in: workingtitle-instruments-epic2/shared/Components/Inputs/InputBox.tsx:287

Method to handle when input focus is set

Parameters

ParameterTypeDescription
eFocusEventThe focus event.

Returns

void


onMouseDown()

onMouseDown(event): void

Defined in: workingtitle-instruments-epic2/shared/Components/Inputs/InputBox.tsx:163

Handles mouse press for draggable inputs.

Parameters

ParameterTypeDescription
eventMouseEventThe DOM event.

Returns

void


onMouseMove()

onMouseMove(event): void

Defined in: workingtitle-instruments-epic2/shared/Components/Inputs/InputBox.tsx:174

Update the endPoint on mousemove

Parameters

ParameterTypeDescription
eventMouseEventMouseCoordinates

Returns

void


onMouseUp()

onMouseUp(): void

Defined in: workingtitle-instruments-epic2/shared/Components/Inputs/InputBox.tsx:182

Remove the listeners and reset

Returns

void


render()

render(): VNode

Defined in: workingtitle-instruments-epic2/shared/Components/Inputs/InputBox.tsx:420

Renders the component.

Returns

VNode

A JSX element to be rendered.

Overrides

DisplayComponent.render