@theredhead — Frontend Library - v1.0.0
    Preparing search index...

    Interface IActiveDatasource<T>

    A datasource that supports notifying consumers about changes to specific rows or ranges of rows.

    interface IActiveDatasource<T = unknown> {
        noteRowChanged?: Emitter<RowChangedNotification>;
        noteRowRangeChanged?: Emitter<RowRangeChangedNotification>;
        getNumberOfItems(): number | Promise<number>;
        getObjectAtRowIndex(rowIndex: number): RowResult<T>;
    }

    Type Parameters

    • T = unknown

      The row object type.

    Hierarchy (View Summary)

    Implemented by

    Index

    Properties

    Fires when a specific row has changed. The event includes the index of the changed row.

    noteRowRangeChanged?: Emitter<RowRangeChangedNotification>

    Fires when a range of rows has changed. The event includes the definition of the changed range.

    Methods

    • Returns the total number of items, synchronously or asynchronously.

      Returns number | Promise<number>

    • Returns the row object at the given index.

      Parameters

      • rowIndex: number

        Zero-based index of the row to retrieve.

      Returns RowResult<T>

      The row value, or a Promise that resolves to it.