Skip to content

ListViewOptions

Defined in: ui/collection/list-view.ts:14

T = unknown

dataSource: DataSource<T>

Defined in: ui/collection/list-view.ts:18


layout: LayoutProvider

Defined in: ui/collection/list-view.ts:19


optional onItemBound?: (entity, data, index) => void

Defined in: ui/collection/list-view.ts:37

Called after each bind, useful for ad-hoc per-item tweaks.

number

T

number

void


parent: number

Defined in: ui/collection/list-view.ts:17

Entity that hosts the scrolling content (items are parented here).


optional placeItem?: (world, entity, rect, index) => void

Defined in: ui/collection/list-view.ts:35

Override how an item entity is positioned for its computed rect. Default writes Transform.position = (centerX, -centerY, 0) so the item’s center lands on the layout rect center in a y-up world.

World

number

Rect

number

void


optional recycleBuffer?: number

Defined in: ui/collection/list-view.ts:29

Extra index count kept mounted on each side of the strict visible range. Default 2. For grid layouts set this to columns * 2 or similar for row-level padding.


optional setVisible?: (world, entity, visible) => void

Defined in: ui/collection/list-view.ts:39

Toggle visibility on pool acquire/release. Forwarded to ViewPool.

World

number

boolean

void


templates: Record<string, ListViewItemTemplate<T>>

Defined in: ui/collection/list-view.ts:23

Map of item type → template; every getItemType(i) result must have a match.


viewportSize: Vec2

Defined in: ui/collection/list-view.ts:21

Size of the visible window into the content, in content-local units.


world: World

Defined in: ui/collection/list-view.ts:15