In order to migrate a page using the TableToolsTable
to the AsyncTableToolsTable
the following steps need to happen:
- Replace
TableToolsTable
with theAsyncTableToolsTable
- Wrap the component using the table with the
TableStateProvider
, above where we want to access the serialised table state for theuseQuery
hook or the API client instance. - Correct or add the necessary
filterAttribute
orfilterSerialiser
properties for filters - Correct or add the necessary
sortable
property for columns. - Add the
numberOfItems
option to be passed to theAsyncTableToolsTable
from the "meta" section or the API response to enable pagination. - Integrate the serialised table state with
useQuery