ResultSortedRowIdsListener
The ResultSortedRowIdsListener
type describes a function that is used to listen to changes to the sorted Row
Ids
in a query's result Table
.
(
queries: Queries,
tableId: Id,
cellId: Id | undefined,
descending: boolean,
offset: number,
limit: number | undefined,
sortedRowIds: Ids,
): void
Type | Description | |
---|---|---|
queries | Queries | A reference to the |
tableId | Id | The |
cellId | Id | undefined | |
descending | boolean | Whether the sorting was in descending order. |
offset | number | |
limit | number | undefined | |
sortedRowIds | Ids | |
returns | void | This has no return value. |
A ResultSortedRowIdsListener
is provided when using the addResultSortedRowIdsListener
method. See that method for specific examples.
When called, a ResultSortedRowIdsListener
is given a reference to the Queries
object, the Id
of the Table
whose Row
Ids
changed (which is the same as the query Id
), the Cell
Id
being used to sort them, whether descending or not, and the offset and limit of the number of Ids
returned, for pagination purposes. It also receives the sorted array of Ids
itself, so that you can use them in the listener without the additional cost of an explicit call to getResultSortedRowIds.
Since
v2.0.0