The row object type.
ReadonlynoteFires when a specific row has changed. The event includes the index of the changed row.
ReadonlynoteFires when a range of rows has changed. The event includes the definition of the changed range.
Protected ReadonlyrowsThe full, unfiltered dataset.
Useful when consumers need to inspect the original data while a filter is active (e.g. to infer field types from a sample row without the result disappearing when the filter yields no matches).
Clears any active filter, restoring all rows.
Applies a structured CompiledFilter to the datasource.
The expression is compiled into a single predicate once, which is
then applied to every row. Pass an empty array (or null /
undefined) to clear the filter and show all rows.
Returns the total number of items, synchronously or asynchronously.
Returns the row object at the given index.
Zero-based index of the row to retrieve.
The row value, or a Promise that resolves to it.
Inserts item at index, shifting subsequent items to the right.
After this call, getNumberOfItems() must return one more than
before, and getObjectAtRowIndex(index) must return the inserted item.
The zero-based position at which to insert.
The item to insert.
Moves the item at fromIndex to toIndex, shifting other items
to accommodate.
After this call, subsequent calls to getObjectAtRowIndex() and
getNumberOfItems() must reflect the new order.
The current zero-based index of the item to move.
The desired zero-based index for the item.
Notifies consumers that all visible data should be considered stale. Call this after bulk mutations that affect many rows.
Notifies consumers that the row at the given index has been externally mutated (e.g. property values changed in-place).
Call this after directly modifying a row object so that any listening UI (such as a table view) can re-read the data.
Zero-based index of the changed row.
Removes and returns the item at index, shifting subsequent items
to the left.
After this call, getNumberOfItems() must return one fewer than
before.
The zero-based position of the item to remove.
The removed item.
An in-memory array datasource that supports filtering via a CompiledFilter.
When an expression is applied the datasource compiles it into a single predicate, re-derives its visible rows from the original data, and exposes only the matching items. The underlying array is never mutated.
Example