Skip to main content

Class: UiList<DataType>

A touchscreen vertically scrollable list which includes an animated scroll bar and supports rendering either a static or dynamic sequence of list items.

Type parameters

NameType
DataTypeextends DynamicListData

Hierarchy

Implements

Constructors

constructor

new UiList<DataType>(props): UiList<DataType>

Creates an instance of a DisplayComponent.

Type parameters

NameType
DataTypeextends DynamicListData

Parameters

NameTypeDescription
propsUiListProps<DataType>The propertis of the component.

Returns

UiList<DataType>

Inherited from

DisplayComponent<UiListProps<DataType>>.constructor

Defined in

src/sdk/components/FSComponent.ts:73

Properties

context

Optional context: [] = undefined

The context on this component, if any.

Inherited from

DisplayComponent.context

Defined in

src/sdk/components/FSComponent.ts:64


contextType

Optional Readonly contextType: readonly [] = undefined

The type of context for this component, if any.

Inherited from

DisplayComponent.contextType

Defined in

src/sdk/components/FSComponent.ts:67


itemCount

Readonly itemCount: Subscribable<number>

The total number of items in this list, including hidden items.

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/List/UiList.tsx:135


knobLabelState

Readonly knobLabelState: SubscribableMap<UiKnobId, string> & Subscribable<UiKnobRequestedLabelState>

The bezel rotary knob label state requested by this list.

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/List/UiList.tsx:150


props

props: UiListProps<DataType> & ComponentProps

The properties of the component.

Inherited from

DisplayComponent.props

Defined in

src/sdk/components/FSComponent.ts:61


renderWindow

Readonly renderWindow: Subscribable<Readonly<Omit<Float64Array, "set" | "sort" | "copyWithin">>>

The window of rendered list items, as [startIndex, endIndex], where startIndex is the index of the first rendered item, inclusive, and endIndex is the index of the last rendered item, exclusive.

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/List/UiList.tsx:146


visibleItemCount

Readonly visibleItemCount: Subscribable<number>

The total number of visible items in this list.

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/List/UiList.tsx:139

Methods

clearRecentFocus

clearRecentFocus(): void

Clears this list's memory of the most recently focused item. Has no effect if an item is currently focused.

Returns

void

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/List/UiList.tsx:656


destroy

destroy(): void

Returns

void

Inherit Doc

Overrides

DisplayComponent.destroy

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/List/UiList.tsx:961


focusFirst

focusFirst(focusDirection?): void

Focuses the first focusable item in this list.

Parameters

NameTypeDescription
focusDirection?UiFocusDirectionThe direction from which to focus the item. Defaults to UiFocusDirection.Unspecified.

Returns

void

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/List/UiList.tsx:626


focusIndex

focusIndex(index, focusDirection?): void

Focuses an item at a specified index in this list.

Parameters

NameTypeDescription
indexnumberThe index of the item to focus, after sorting has been applied and hidden items have been excluded. If the index is out of bounds, then focus will not be set.
focusDirection?UiFocusDirectionThe direction from which to focus the item. Defaults to UiFocusDirection.Unspecified.

Returns

void

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/List/UiList.tsx:532


focusItem

focusItem(item, focusDirection?): void

Focuses an item in this list. If this is a static list, then this method does nothing.

Parameters

NameTypeDescription
itemDataTypeThe item to focus.
focusDirection?UiFocusDirectionThe direction from which to focus the item. Defaults to UiFocusDirection.Unspecified.

Returns

void

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/List/UiList.tsx:608


focusLast

focusLast(focusDirection?): void

Focuses the last focusable item in this list.

Parameters

NameTypeDescription
focusDirection?UiFocusDirectionThe direction from which to focus the item. Defaults to UiFocusDirection.Unspecified.

Returns

void

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/List/UiList.tsx:634


focusRecent

focusRecent(): void

Focuses the most recently focused item in this list. Has no effect if an item is currently focused or if there is no most recently focused item.

Returns

void

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/List/UiList.tsx:642


getContext

getContext(context): never

Gets a context data subscription from the context collection.

Parameters

NameTypeDescription
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

Defined in

src/sdk/components/FSComponent.ts:106


getFocusedIndex

getFocusedIndex(): number

Gets the index of this list's focused item after sorting has been applied and hidden items have been excluded.

Returns

number

The index of this list's focused item after sorting has been applied and hidden items have been excluded, or -1 if no item is focused.

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/List/UiList.tsx:513


indexOfSortedIndex

indexOfSortedIndex(sortedIndex): number

Gets the data item index of a sorted index. If this list does not support dynamic data or has not been rendered, then this method will return -1.

Parameters

NameTypeDescription
sortedIndexnumberA sorted index.

Returns

number

The index of the data item that is sorted to the specified index, or -1 if the sorted index is out of bounds, this list does not support dynamic data, or this list has not been rendered.

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/List/UiList.tsx:387


indexOfSortedVisibleIndex

indexOfSortedVisibleIndex(sortedVisibleIndex): number

Gets the data item index of a sorted index after hidden items have been excluded. If this list does not support dynamic data or has not been rendered, then this method will return -1.

Parameters

NameTypeDescription
sortedVisibleIndexnumberA sorted index after hidden items have been excluded.

Returns

number

The index of the data item that is sorted to the specified index after hidden items have been excluded, or -1 if the sorted index is out of bounds, this list does not support dynamic data, or this list has not been rendered.

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/List/UiList.tsx:399


onAfterRender

onAfterRender(): void

Returns

void

Inherit Doc

Overrides

DisplayComponent.onAfterRender

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/List/UiList.tsx:170


onBeforeRender

onBeforeRender(): void

A callback that is called before the component is rendered.

Returns

void

Inherited from

DisplayComponent.onBeforeRender

Defined in

src/sdk/components/FSComponent.ts:80


onUiInteractionEvent

onUiInteractionEvent(event): boolean

Handles a UiInteractionEvent.

Parameters

NameTypeDescription
eventUiInteractionEventThe event to handle.

Returns

boolean

Whether the event was handled.

Implementation of

UiInteractionHandler.onUiInteractionEvent

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/List/UiList.tsx:672


removeFocus

removeFocus(): void

Removes focus from the currently focused item in this list.

Returns

void

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/List/UiList.tsx:649


render

render(): VNode

Returns

VNode

Inherit Doc

Overrides

DisplayComponent.render

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/List/UiList.tsx:924


scrollToIndex

scrollToIndex(index, position, focus, animate, skipScrollIfItemInView?, focusDirection?): void

Scrolls until the item at a specified index is in view.

Parameters

NameTypeDefault valueDescription
indexnumberundefinedThe index of the item to which to scroll, after sorting has been applied and hidden items have been excluded.
positionnumberundefinedThe position to place the target item at the end of the scroll. Position 0 is the top/left-most visible slot, position 1 is the next slot, and so on. Values greater than or equal to the number of visible items per page will be clamped. Negative values will be interpreted as counting backwards from the bottom/right-most visible slot starting with -1. Ignored if this list does not support snapping to list items.
focusbooleanundefinedWhether to focus the item to which to scroll.
animatebooleanundefinedWhether to animate the scroll.
skipScrollIfItemInViewbooleanfalseWhether to skip the scroll operation if the target item is already in view or will be in view when the current scrolling animation finishes. The target item will still be focused if focus is true even if the scroll operation is skipped. Defaults to false.
focusDirection?UiFocusDirectionundefinedThe direction from which to focus the item to which to scroll. Ignored if focus is false. Defaults to UiFocusDirection.Unspecified.

Returns

void

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/List/UiList.tsx:419


scrollToIndexWithMargin

scrollToIndexWithMargin(index, margin, focus, animate, skipScrollIfItemInView?, focusDirection?): void

Scrolls the minimum possible distance until the item at a specified index is in view with a given margin from the edges of the visible list.

Parameters

NameTypeDefault valueDescription
indexnumberundefinedThe index of the item to which to scroll, after sorting has been applied and hidden items have been excluded.
marginnumberundefinedThe margin from the edges of the visible list to respect when scrolling to the target item. In other words, the scrolling operation will attempt to place the target item at least as far from the edges of the visible list as the specified margin. If this list supports snapping to items, then the margin should be expressed as an item count. If this list does not support snapping to items, then the margin should be expressed as pixels. The margin will be clamped between zero and the largest possible value such that an item can be placed within the visible list while respecting the margin value on both sides.
focusbooleanundefinedWhether to focus the item to which to scroll.
animatebooleanundefinedWhether to animate the scroll.
skipScrollIfItemInViewbooleanfalseWhether to skip the scroll operation if the target item is already in view or will be in view when the current scrolling animation finishes. The target item will still be focused if focus is true even if the scroll operation is skipped. Defaults to false.
focusDirection?UiFocusDirectionundefinedThe direction from which to focus the item to which to scroll. Ignored if focus is false. Defaults to UiFocusDirection.Unspecified.

Returns

void

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/List/UiList.tsx:473


scrollToItem

scrollToItem(item, position, focus, animate, skipScrollIfItemInView?): void

Scrolls until the specified item is in view. If this is a static list, then this method does nothing.

Parameters

NameTypeDefault valueDescription
itemDataTypeundefinedThe item to which to scroll.
positionnumberundefinedThe position to place the target item at the end of the scroll. Position 0 is the top/left-most visible slot, position 1 is the next slot, and so on. Values greater than or equal to the number of visible items per page will be clamped. Negative values will be interpreted as counting backwards from the bottom/right-most visible slot starting with -1. Ignored if this list does not support snapping to list items.
focusbooleanundefinedWhether to focus the item to which to scroll.
animatebooleanundefinedWhether to animate the scroll.
skipScrollIfItemInViewbooleanfalseWhether to skip the scroll operation if the target item is already in view. The target item will still be focused if focus is true even if the scroll operation is skipped. Defaults to false.

Returns

void

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/List/UiList.tsx:559


scrollToItemWithMargin

scrollToItemWithMargin(item, margin, focus, animate, skipScrollIfItemInView?): void

Scrolls the minimum possible distance until the specified item is in view with a given margin from the edges of the visible list. If this is a static list, then this method does nothing.

Parameters

NameTypeDefault valueDescription
itemDataTypeundefinedThe item to which to scroll.
marginnumberundefinedThe margin from the edges of the visible list to respect when scrolling to the target item. In other words, the scrolling operation will attempt to place the target item at least as far from the edges of the visible list as the specified margin. If this list supports snapping to items, then the margin should be expressed as an item count. If this list does not support snapping to items, then the margin should be expressed as pixels. The margin will be clamped between zero and the largest possible value such that an item can be placed within the visible list while respecting the margin value on both sides.
focusbooleanundefinedWhether to focus the item to which to scroll.
animatebooleanundefinedWhether to animate the scroll.
skipScrollIfItemInViewbooleanfalseWhether to skip the scroll operation if the target item is already in view. The target item will still be focused if focus is true even if the scroll operation is skipped. Defaults to false.

Returns

void

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/List/UiList.tsx:589


sortedIndexOfData

sortedIndexOfData(data): number

Gets the sorted index of a data item. If this list does not support dynamic data or has not been rendered, then this method will return -1.

Parameters

NameTypeDescription
dataDataTypeA data item.

Returns

number

The index to which the specified data item is sorted, or -1 if the item is not in this list, this list does not support dynamic data, or this list has not been rendered.

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/List/UiList.tsx:352


sortedIndexOfIndex

sortedIndexOfIndex(index): number

Gets the sorted index of a data item index. If this list does not support dynamic data or has not been rendered, then this method will return -1.

Parameters

NameTypeDescription
indexnumberA data item index.

Returns

number

The index to which the specified data item index is sorted, or -1 if the data index is out of bounds, this list does not support dynamic data, or this list has not been rendered.

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/List/UiList.tsx:341


sortedVisibleIndexOfData

sortedVisibleIndexOfData(data): number

Gets the sorted index of a data item after hidden items have been excluded. If this list does not support dynamic data or has not been rendered, then this method will return -1.

Parameters

NameTypeDescription
dataDataTypeA data item.

Returns

number

The index to which the specified data item is sorted after hidden items have been excluded, or -1 if the item is not in this list, the item is itself hidden, this list does not support dynamic data, or this list has not been rendered.

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/List/UiList.tsx:376


sortedVisibleIndexOfIndex

sortedVisibleIndexOfIndex(index): number

Gets the sorted index of a data item index after hidden items have been excluded. If this list does not support dynamic data or has not been rendered, then this method will return -1.

Parameters

NameTypeDescription
indexnumberA data item index.

Returns

number

The index to which the specified data item index is sorted after hidden items have been excluded, or -1 if the data index is out of bounds, the data item whose index was given is itself hidden, this list does not support dynamic data, or this list has not been rendered.

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/List/UiList.tsx:364


updateOrder

updateOrder(): void

Updates the order of rendered items in this list.

Returns

void

Defined in

src/workingtitle-instruments-g3x-touch/html_ui/Pages/VCockpit/Instruments/NavSystems/G3XTouch/Shared/Components/List/UiList.tsx:663