Interface: UiListProps<DataType>
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/List/UiList.tsx:28
Component props for UiList.
Extends
ComponentProps
.UiListFormattingProps
Type Parameters
Type Parameter |
---|
DataType |
Properties
animateScrollToFocus?
optional
animateScrollToFocus:boolean
|Subscribable
<boolean
>
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/List/UiList.tsx:80
Whether to animate scrolling when the list automatically scrolls to a newly focused item. Defaults to true
.
autoDisableOverscroll?
optional
autoDisableOverscroll:boolean
|Subscribable
<boolean
>
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/List/UiList.tsx:61
Whether to automatically disable overscrolling when the total height of all the list's items does not exceed the
list's visible height. Defaults to false
.
autoRefocus?
optional
autoRefocus:boolean
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/List/UiList.tsx:86
Whether the list should automatically try to focus another item if the focused item loses focus because it could
no longer be focused or if it was removed from the list. Defaults to false
.
bus
bus:
EventBus
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/List/UiList.tsx:30
The event bus.
Overrides
UiListFormattingProps.bus
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/List/UiList.tsx:109
CSS class(es) to add to the list's root element.
Overrides
UiListFormattingProps.class
data?
optional
data:SubscribableArray
<DataType
>
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/List/UiList.tsx:42
The data to display in the list. If both this property and renderItem
are defined, the list will display
rendered data items instead of its children.
fadeScrollBar?
optional
fadeScrollBar:boolean
|Subscribable
<boolean
>
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/List/UiList.tsx:75
Whether to fade out the scroll bar when the total height of all the list's items is less than or equal to the
list's visible height. Space is reserved for the scroll bar even when it is faded out. Defaults to true
.
itemsPerPage?
optional
itemsPerPage:number
|Subscribable
<number
>
Defined in: src/garminsdk/components/list/ScrollList.tsx:37
The number of visible items per page. If not defined, the list will not snap to list items when scrolling.
Inherited from
UiListFormattingProps.itemsPerPage
lengthPx?
optional
lengthPx:number
|Subscribable
<number
>
Defined in: src/garminsdk/components/list/ScrollList.tsx:34
The length of the list, in pixels, along its scroll axis. If not defined, then the default value depends on whether the number of items per page is defined. If the number of items per page is defined, then the length defaults to the sum of the list item length and spacing multiplied by the number of items per page. If the number of items per page is not defined, then the length defaults to 100 pixels.
Inherited from
UiListFormattingProps.lengthPx
listItemLengthPx
listItemLengthPx:
number
|Subscribable
<number
>
Defined in: src/garminsdk/components/list/ScrollList.tsx:17
The length of each list item, in pixels, along the list's scroll axis.
Inherited from
UiListFormattingProps.listItemLengthPx
listItemSpacingPx?
optional
listItemSpacingPx:number
|Subscribable
<number
>
Defined in: src/garminsdk/components/list/ScrollList.tsx:20
The amount of space between each list item in pixels. Defaults to zero pixels.
Inherited from
UiListFormattingProps.listItemSpacingPx
maxOverscrollPx?
optional
maxOverscrollPx:number
|Subscribable
<number
>
Defined in: src/garminsdk/components/list/ScrollList.tsx:26
The maximum distance the list can overscroll past the beginning and end, in pixels. Defaults to the length of one list item.
Inherited from
UiListFormattingProps.maxOverscrollPx
maxRenderedItemCount?
optional
maxRenderedItemCount:number
|Subscribable
<number
>
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/List/UiList.tsx:55
The maximum number of items that can be rendered simultaneously. Ignored if data
, renderItem
, or
itemsPerPage
is not defined. The value will be clamped to be greater than or equal to itemsPerPage * 3
.
Defaults to infinity.
onDestroy()?
optional
onDestroy: () =>void
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/List/UiList.tsx:106
A callback function to execute when the list is destroyed.
Returns
void
onTopVisibleIndexChanged()?
optional
onTopVisibleIndexChanged: (topVisibleIndex
) =>void
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/List/UiList.tsx:103
A callback that will be called with the topVisibleIndex when it changes.
Parameters
Parameter | Type |
---|---|
topVisibleIndex | number |
Returns
void
ref?
optional
ref:NodeReference
<any
>
Defined in: src/sdk/components/FSComponent.ts:125
A reference to the display component.
Inherited from
ComponentProps.ref
renderItem()?
optional
renderItem: (data
,index
) =>VNode
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/List/UiList.tsx:48
A function that renders a single data item into the list. If both this property and data
are defined, the
list will display rendered data items instead of its children.
Parameters
Parameter | Type |
---|---|
data | DataType |
index | number |
Returns
VNode
showScrollBar?
optional
showScrollBar:boolean
|"auto"
|Subscribable
<boolean
|"auto"
>
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/List/UiList.tsx:69
Whether to show the list's scroll bar. If true
, then space is always reserved for the scroll bar, and its
visibility depends on the fadeScrollBar
option. If false
, then no space is reserved for the scroll bar and it
is always hidden. If auto
, then space is reserved for the scroll bar if and only if the total height of all the
list's items exceeds the list's visible height. Defaults to true
.
sortItems()?
optional
sortItems: (a
,b
) =>number
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/List/UiList.tsx:100
A function to sort data items before rendering them. The function should return a negative number if the first item should be rendered before the second, a positive number if the first item should be rendered after the second, or zero if the two items' relative order does not matter. If not defined, items will be rendered in the order in which they appear in the data array.
Parameters
Parameter | Type |
---|---|
a | DataType |
b | DataType |
Returns
number
staticChildren?
optional
staticChildren:VNode
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/List/UiList.tsx:92
A VNode which will be rendered into the list's translating container and positioned after the container that holds the list's rendered items.
validKnobIds?
optional
validKnobIds:Iterable
<UiKnobId
>
Defined in: src/workingtitle-instruments-g3x-touch/html_ui/Shared/Components/List/UiList.tsx:36
The IDs of the valid bezel rotary knobs that can be used to change the list's focused item. If not defined, then knobs cannot be used to change the list's focused item.