Optional ReadonlyactivityThe activity manager that is used for error handling.
Optional ReadonlycontextThe query context to use for fetching data if this is a remote list model.
Optional ReadonlyodataThe odata instance to use for fetching data if this is a remote list model.
A readonly array of all items if this is an in-memory list model.
To modify items in memory, either replace the entire list model or use the API supported by the list model.
A promise that resolves when the total count is loaded.
This promise may be replaced at any time even if the previous one is not yet resolved.
True, if there is a next page.
True, if the total count is permanently unknown.
Get the current page of items.
The current page all items if paging is disabled.
Get the total number of pages.
The number of pages or undefined if paging is disabled or the total item count is not yet known. This returns at least 1 if there are no items.
Get the current page index.
Set the current page index.
A promise that resolves when the current page is loaded.
This promise may be replaced at any time even if the previous one is not yet resolved.
Get the number of items per page.
The page size or null if paging is disabled.
Get the current number of selected indices.
Get the first selected item.
Get the only selected index within the current page.
The index or undefined if there isn't exactly one selected index.
Get the total item count.
The total count or undefined if it is not yet known.
Abort the current page request.
Clear the selection.
Get a sorted array of all selected indices on the current page.
Get an array of all selected items in any order.
Check if the specified index is selected.
Move the currently selected item down.
Move the currently selected item up.
Queue a task to run once when this list model has been refreshed.
Schedule refreshing the current page in the next microtask.
Select all items.
Select a single item at the specified index.
False if the index was out of range.
Select a single range of items by index.
Indices may be specified in any order and may be out of range.
The inclusive start index.
The inclusive to index.
Set the selection. This replaces the entire selection.
The indices to select. Indices out of range are ignored.
Apply sorting to this model.
If this is a remote model, the sorting is applied to the context, else the allItems array is sorted in memory.
Toggle the selection of a range of items by index. Previously selected items outside the range are preserved.
The inclusive start index.
The inclusive end index. If this index will toggle to selected, all items in the range are selected, else all items in the range are deselected.
Optionalselect: booleanWether to select or deselect the range or undefined to toggle.
Toggle the selection at a specific index.
The index to toggle. This may be out of range.
Optionalselect: booleanWether to select or deselect the index or undefined to toggle.
Data model for all lists that stores items, the number of items, paging information and the selection.