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

    Function fetchAllRows

    • Fetches every row matching a sort and filter, beyond the one page the grid holds — which is how the grid's CSV export covers the whole result set.

      Requests are issued one after another, chunkSize rows at a time, and stop at whichever comes first: the server's lastRow, an empty response (for a server that reports lastRow: -1), or maxRows. The requests have the same wire shape as the grid's own paging requests, always ungrouped — so a grouped grid exports its rows, not its group summaries.

      Type Parameters

      • T

        The row type.

      Parameters

      Returns Promise<T[]>

      Up to maxRows rows, in server order.

      Whatever getRows throws, including an AbortError when signal is aborted.

      const rows = await fetchAllRows(dataSource, {
      sortModel: api.getSortModel(),
      filterModel: api.getFilterModel(),
      maxRows: 5000,
      });