class UIListView
A view wrapper that manages nested views for each item in a list.
class UIListView<
TItem extends ObservableObject = ObservableObject,
> extends Widget;
Description
A list view creates and renders content within a container, based on items from a provided list (either an array, or an ObservableList object).
Constructor
new UIListView()
Creates a new list view object.
Type members
type UIListView.RenderOptions static
An object that contains options for (asynchronous) list rendering.class ItemControllerView static
A view that’s created automatically for each list item by UIListView.class ListBuilder static
A builder class for creatingUIListViewinstances.
Static members
function listBuilder() static
Creates a view builder for a list view wrapper.
Instance members
items
The list of objects, from which each object is used to construct one view object.renderOptions
Render options, including asynchronous and delayed rendering.firstIndex
Index of first item to be shown in the list.maxItems
The maximum number of items to be shown in the list.appendSpacer
True if a spacer should be added after the last list item view.lastFocusedIndex
The index of the last focused list item view, if any.setItems()
Sets the list of items to be displayed.getIndexOfView()
Returns the list index of the specified view, or of its parent(s).getContent()
Returns the current content of the list item view container (an observable list of views), if any.requestFocus()
Requests input focus on the last-focused list view object, or the first one, if possible.focusPreviousItem()
Requests input focus on the view object before the last focused item.focusNextItem()
Requests input focus on the view object after the last focused item.onFocusNext() protected
Event handler that focuses the next list item when a FocusNext event is emitted within the view.onFocusPrevious() protected
Event handler that focuses the previous list item when a FocusPrevious event is emitted within the view.onFocusIn() protected
Event handler that handles list item focus.beforeUnlink() protected
Unlink handler, explicitly frees some resources for this list.beforeRender() protected
Render callback, sets the accessible role of the list container.
Inherited members
body() protected
The encapsulated view object, an attached view.findViewContent()
Searches the view hierarchy for view objects of the provided type.delegate()
Delegates incoming events to methods of this object, notably from the attached view body.render()
Creates and renders the encapsulated view body, if any.emit()
Emits an event, immediately calling all event handlers.emitChange()
Emits a change event.listen()
Adds a handler for all events emitted by this object.listenOnce()
Returns a promise for a single event with the provided name.listenAsync()
Adds a handler for all events emitted by this object, and returns an async iterable.observe()
Observes a property, a bound property from an attached parent, or an observable object.observeAsync()
Observes one or more targets asynchronously, batching or debouncing/throttling updates.attach() protected
Attaches the specified observable object to this object.isUnlinked()
Returns true if the object has been unlinked.unlink()
Unlinks this observable object.
