@helix-x/datagrid-ui - v0.1.2
    Preparing search index...

    Interface UseServerDataSourceResult<T>

    What useServerDataSource returns.

    interface UseServerDataSourceResult<T> {
        error: unknown;
        isLoading: boolean;
        patchRows: (rows: T[], getRowId: (row: T) => string | number) => void;
        refresh: (options?: { purge?: boolean }) => void;
        rows: T[];
        totalRows: number;
    }

    Type Parameters

    • T

      The row type.

    Index
    error: unknown

    The last error, or null.

    isLoading: boolean

    True while a fetch is in flight.

    patchRows: (rows: T[], getRowId: (row: T) => string | number) => void

    Patch loaded rows in place, matched by id. Ids that are not loaded are ignored. No network request is made.

    refresh: (options?: { purge?: boolean }) => void

    Re-fetch the current page.

    Type Declaration

      • (options?: { purge?: boolean }): void
      • Parameters

        • Optionaloptions: { purge?: boolean }

          purge: true drops every cached block first.

        Returns void

    rows: T[]

    Rows for the current page. Empty while the first fetch is in flight.

    totalRows: number

    Total across all pages, from the response's lastRow.