API Reference / @gtkx/components / ListItem
Type Alias: ListItem<T>
ListItem<
T> =object
Defined in: types.d.ts:10
A single item in a collection model, identified by a stable id and holding an arbitrary value. Nested items form a tree.
Type Parameters
T
T = unknown
Properties
children?
optionalchildren?:ListItem<T>[]
Defined in: types.d.ts:16
Child items nested under this one, which turn a plain item list into a tree, read only as rows are drawn.
id
id:
string
Defined in: types.d.ts:12
Stable identifier used to track the item across updates and selection, naming every row that carries it.
shouldHideExpander?
optionalshouldHideExpander?:boolean
Defined in: types.d.ts:18
Hides the tree expander arrow even when the item has children, through hide-expander.
shouldIndentForDepth?
optionalshouldIndentForDepth?:boolean
Defined in: types.d.ts:20
Adds indentation matching the item's depth in the tree, through indent-for-depth.
shouldIndentForIcon?
optionalshouldIndentForIcon?:boolean
Defined in: types.d.ts:22
Reserves indentation space for an expander icon, through indent-for-icon.
value
value:
T
Defined in: types.d.ts:14
Payload handed to the cell renderer as ListItemRenderArgs.item.