API Reference / @gtkx/components / ListItem
Type Alias: ListItem<T>
ListItem<
T> =object
Defined in: packages/components/src/types.ts:19
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: packages/components/src/types.ts:25
Child items in an acyclic tree, read only as rows are drawn.
id
id:
string
Defined in: packages/components/src/types.ts:21
Stable identifier, unique across the collection, used to preserve identity across updates and selection.
shouldHideExpander?
optionalshouldHideExpander?:boolean
Defined in: packages/components/src/types.ts:27
Hides the tree expander arrow even when the item has children, through hide-expander.
shouldIndentForDepth?
optionalshouldIndentForDepth?:boolean
Defined in: packages/components/src/types.ts:29
Adds indentation matching the item's depth in the tree, through indent-for-depth.
shouldIndentForIcon?
optionalshouldIndentForIcon?:boolean
Defined in: packages/components/src/types.ts:31
Reserves indentation space for an expander icon, through indent-for-icon.
value
value:
T
Defined in: packages/components/src/types.ts:23
Payload handed to the cell renderer as ListItemRenderArgs.item.