useTableFetcher

POST query-table and update table Redux state

File: ./ApiTables/hooks/useTableFetcher.ts

Called from ApiTablesController — not typically used in feature pages.

API

const { tableFetchingHandler } = useTableFetcher();

Request

POST /api-table/control-tables/query-table/${tableName}
{
  perPage, page, filters, sorts, params?
}

Uses AbortSignal for cancellation.

Side effects on fetch start

  • _setSelectedRows([])
  • _setTableLoading(true)
  • _getTableData([])
  • _setToggledClearRow(!toggledClearRows) — forces RDT selection reset

On success

  • _getTableData(items)
  • _getTablePagination(pagination)
  • _getTableBindings(bindings)
  • Column width update via _setTableColumns({ update: true, ... })

On this page