Skip to main content

Class: UiListItem

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/List/UiListItem.tsx:52

An item meant to be rendered within a UI list as a list item. The item consists of a root container which can be focused by touching it. Additionally, one descendant of the item can be designated as a focusable component by wrapping it with a UiListFocusable. If a focusable component is designated, it will gain focus when the item gains focus and vice versa. If multiple descendants are wrapped with UiListFocusable, then only the first one found using a depth-first search will be designated.

By default, the item is highlighted with a cyan border when it is focused unless its designated focusable component is also focused.

Extends​

Implements​

Constructors​

Constructor​

new UiListItem(props): UiListItem

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

Creates an instance of a DisplayComponent.

Parameters​

ParameterTypeDescription
propsUiListItemPropsThe propertis of the component.

Returns​

UiListItem

Inherited from​

DisplayComponent.constructor

Properties​

canBeFocused​

readonly canBeFocused: Subscribable<boolean>

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/List/UiListItem.tsx:63

Inherit Doc​


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


isUiFocusableComponent​

readonly isUiFocusableComponent: true = true

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/List/UiListItem.tsx:54

Inherit Doc​


props​

props: UiListItemProps & ComponentProps

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

The properties of the component.

Inherited from​

DisplayComponent.props

Methods​

destroy()​

destroy(): void

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/List/UiListItem.tsx:204

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


onAfterRender()​

onAfterRender(thisNode): void

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/List/UiListItem.tsx:72

A callback that is called after the component is rendered.

Parameters​

ParameterTypeDescription
thisNodeVNodeThe component's VNode.

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


onUiInteractionEvent()​

onUiInteractionEvent(event): boolean

Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/List/UiListItem.tsx:112

Handles a UiInteractionEvent.

Parameters​

ParameterTypeDescription
eventUiInteractionEventThe event to handle.

Returns​

boolean

Whether the event was handled.

Implementation of​

UiInteractionHandler.onUiInteractionEvent


render()​

render(): VNode

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

Renders the component.

Returns​

VNode

A JSX element to be rendered.

Overrides​

DisplayComponent.render