NUI / Components / Scroll, Lists & Data

ListViewBase

ImplementedScroll, Lists & Data

ListViewBase is a base data-driven list component for repeated entries.

Supported as an advanced base list-view data surface.

Overview

ListViewBase is a base data-driven list component for repeated entries.

When to use

  • Use ListViewBase in advanced documentation or generated docs when a lower-level list view surface is needed. Most public docs should lead users to ListView.

Children

Uses data/template fields instead of normal children.

Basic syntax

nui
ListViewBase ItemsBase {
    items: "wood|Wood|1;stone|Stone|2"
}

Supported properties

PropertyTypeRequiredDefaultDescription
itemsstringNoEmptyInline item data.
dataSourcestringNoEmptyNamed external data source.
itemKeystringNoEmptyField or static key binding.
itemTextstringNoEmptyField or static display text binding.
itemValuestringNoEmptyField or static value binding.
itemCommandstringNoEmptyCommand when an item is used or selected.
selectedKeystringNoEmptyInitially selected item key.
selectionModeenumNosingleSelection mode.
entryHeightnumberNoDefaultEntry height.
virtualizedboolNotrueEnables virtualization.
recycleEntriesboolNotrueReuses entry widgets.
overscannumberNoDefaultExtra entries around viewport.
scrollBarVisibilityenumNoautoScrollbar visibility.
gapnumberNo0Space between entries.
widthnumberNoAutoDesired width.
heightnumberNoAutoDesired height.
visibleboolNotrueVisibility flag.

Contextual properties

Contextual property rules

ListViewBase may receive stack, canvas, grid, wrap, or ExpandableArea slot properties only when it is authored as a direct child of the matching parent. It does not support normal authored child nodes.

Full syntax example

nui
ListViewBase ItemsBase {
    items: "wood|Wood|1;stone|Stone|2"
    itemKey: "id"
    itemText: "name"
    itemValue: "count"
    itemCommand: "SelectItem"
    selectedKey: "wood"
    selectionMode: single
    entryHeight: 32
    virtualized: true
    recycleEntries: true
    overscan: 2
    scrollBarVisibility: auto
    gap: 4
    width: 320
    height: 240
    visible: true
}

Limitations

  • Normal children { ... } blocks are not public syntax for this component.
  • Drag and drop should not be documented as currently supported.