Loading state

Set progressPending to true while your data is in-flight. DataTable adapts its loading UI based on whether rows are already visible:

  • Initial load (no data yet): shimmer skeleton rows fill the body so the layout doesn't collapse.
  • Re-fetch (rows already shown): existing rows stay in place, dim to 40% opacity, and a spinner overlays the centre. The header and pagination never disappear.

Set progressSkeleton to false to opt out of the skeleton on initial load: your progressComponent is shown instead of the shimmer rows. It defaults to true, so a custom progressComponent still uses skeleton rows on first load unless you turn this off.

Loading state

Click either button to see the two loading modes.

Name
Department
Salary
Status
Aria Chen
Engineering
$155,000
Active
Marcus Webb
Product
$132,000
Remote
Priya Kapoor
Design
$118,000
Active
Jordan Ellis
Analytics
$143,000
On Leave
Sam Rivera
Engineering
$128,000
Contractor

Custom spinner or message

The default progressComponent is a CSS spinner circle. Pass any React node to replace it: your node is centred in the overlay during re-fetches. On initial load the skeleton rows show instead; set progressSkeleton= to show your progressComponent there too.

<DataTable progressPending={loading} progressComponent={<MyBrandSpinner size={40} />} />;

Empty state

When progressPending is false and data is empty, the noDataComponent is shown instead.

<DataTable data={[]} progressPending={false} noDataComponent={<p>No results match your search.</p>} />;

Header visibility

The column header always stays visible during progressPending. Use persistTableHead to also keep it visible when data is empty and not loading.

// Keep header visible when data is empty (e.g. after a filter returns nothing)
<DataTable persistTableHead data={[]} columns={columns} />;

Prop reference

PropTypeDefaultDescription
progressPendingbooleanfalseShow a loading state (skeleton on first load, overlay spinner on re-fetch).
progressComponentReactNodebuilt-in spinnerCustom loading indicator shown in the re-fetch overlay, and on initial load when progressSkeleton is false.
progressSkeletonbooleantrueShow shimmer skeleton rows on the initial load (no data yet). Set to false to show progressComponent on initial load instead.
noDataComponentReactNodebuilt-in messageRendered when data is empty.
persistTableHeadbooleanfalseShow the column header even when data is empty. The header always stays visible during progressPending regardless of this prop.