ProGridSign in

Get started

Every property, in plain English

A companion to the API reference for readers who don't yet know ProGrid or the TanStack Table library it's built on. No TypeScript reading required — every property is explained in ordinary language, with the kind of value it expects spelled out in words.

This page covers the same ground as the technical API reference, but written for someone opening ProGrid for the first time. If you already know the codebase or TanStack Table, that page is faster to scan. If a term like “column definition” or “row model” means nothing to you yet, start here.

Words this guide uses

ProGrid is a React component that renders a data table. Underneath it, ProGrid uses TanStack Table — a free library that does the invisible bookkeeping (sorting logic, filtering logic, which rows are grouped under which) without drawing anything on screen. ProGrid is the part that actually draws the grid you see. You will never need to install or configure TanStack Table yourself, but a handful of its words and shapes show up directly in ProGrid’s properties, so it helps to recognize them:

row

One record of data — one order, one user, one line. In your own code this is just a plain JavaScript object, like { id: 1, customer: "Acme", revenue: 4200 }. When a ProGrid property hands you “a row” instead of your plain object, it’s really handing you a small wrapper TanStack builds around it — call row.original on that wrapper to get your actual data back.

column

One vertical slice of the table — which field of your data it shows, what its header says, and (through ProGrid’s extra settings) whether it can be filtered, sorted, grouped, or charted. You describe your columns as a list of plain objects; see the essentials section below.

cell

One value on screen — the intersection of one row and one column. “Revenue for this order” is a cell.

header

The label at the top of a column, and the row of labels as a whole.

meta

A small settings object you attach to each column, alongside TanStack’s own fields like header and accessorKey. Everything ProGrid-specific about a column — its filter, its alignment, whether it can be grouped — lives inside meta. See per-column settings.

state

Everything about the grid that changes as a person uses it: which column is sorted, what’s typed into the filters, which page is showing, which rows are selected. ProGrid tracks all of this internally by default, so you don’t have to — but every piece of it can be read or taken over. See watching and controlling state.

controlled / uncontrolled

“Uncontrolled” means ProGrid owns a piece of state itself — the normal case. “Controlled” means your own application code owns it instead (stores it in its own variable, hands it back to ProGrid as a property) — useful when something else, like the page’s URL, needs to agree with what the grid is showing.

The essentials

Every grid needs rows and a description of its columns. Everything else is optional.

const columns = [
  {
    accessorKey: "customer",  // which field on your row object this column shows
    header: "Customer",       // the text shown at the top of the column
  },
  {
    accessorKey: "revenue",
    header: "Revenue",
    meta: {                   // ProGrid's own settings live in here
      type: "number",
      align: "right",
    },
  },
]
data

Your rows, as a plain array of objects — one entry per row. In the simplest setup, this is your whole dataset. (Skip it only if you use dataSource, described under server data — then ProGrid fetches rows itself.)

columns

A list of column descriptions, in the order they should appear. This is the only property ProGrid actually requires. Each entry is a plain object naming which field of your data it shows (accessorKey) and what its header says (header); ProGrid’s own options for that column go inside its meta object.

getRowId

A function you write that returns a stable, unique piece of text for a given row — usually just (row) => row.id. Without it, ProGrid identifies rows by their position in the list, which breaks selection and expanded rows the moment the data is re-sorted or reordered. Provide it whenever you use selection, expandable rows, or live updates.

Sizing the grid

height

How tall the grid is. Give it a number of pixels (the default is 560) or a CSS size like "70vh". The area inside scrolls and only renders the rows currently in view, however many rows you have.

maxHeight

A ceiling on the height, for use together with height="auto": the grid grows to fit its rows but stops growing — and starts scrolling — once it reaches this size.

rowHeight

How tall one row is, in pixels (default 34). Rows can still grow taller than this if their content needs more room; this number is mainly used to estimate scroll position before rows are measured.

columnVirtualization

true or false. When on, ProGrid only builds the columns currently scrolled into view, instead of every column in the table — important once a table has dozens of columns, since otherwise every column re-renders on every scroll. Left unset, it turns on by itself once there are more than 20 visible columns; columns pinned to the left or right always stay mounted.

fitColumns

true or false (default false). When on and your columns’ widths add up to less than the available space, ProGrid stretches them to fill it rather than leaving blank space on the right. Columns are never shrunk below the width you gave them, so a table wider than its container still scrolls as normal.

className

An extra CSS class name to add to the grid’s outer wrapper, for styling hooks from your own stylesheet.

locale

Either "en" (the default) or "pt". Sets the language of ProGrid’s own text — menus, filter labels, pagination, status messages, and screen-reader labels. It does not translate your own column headers or cell content; that text is yours to translate.

title

Optional text shown at the start of the toolbar, if you want the grid to display its own heading.

emptyMessage

What to show in the body when there are no rows to display and nothing is currently loading. Accepts plain text or any React content (an icon plus a message, for example). Defaults to a locale-appropriate “no rows” message.

The toolbar

The strip above the grid body that holds the search box, refresh button, column chooser, and similar controls.

toolbar

Pass false to hide the toolbar entirely, or pass an object to keep it but change which individual controls it shows (see below). Left unset, the default toolbar appears with its usual controls.

renderToolbar

A function you write to add your own content into the toolbar, placed after the title and before ProGrid’s own buttons. It receives a small object with useful facts — the row count, how many are selected, whether a request is loading, and a refresh() function — so your custom controls can react to grid state.

renderToolbarEnd

The same idea as renderToolbar, but your content is placed after ProGrid’s own built-in buttons instead of before them.

Each built-in toolbar control — inside the toolbar object above — accepts one of three values: true gives it its own button (the default for most), false removes it, and "menu" tucks it away inside a gear-icon dropdown at the end of the toolbar instead of giving it a dedicated button. The gear only appears once something has been moved into it.

toolbar.quickFilter

true or false only (a search box can’t sensibly live inside a dropdown menu). Shows or hides the free-text search box that filters across every column at once. Defaults to shown.

toolbar.expand

The “expand all / collapse all” buttons, which only appear at all once rows are grouped.

toolbar.pivot

The button that switches the grid into pivot (cross-tab) mode. See pivot tables.

toolbar.chart

The button that opens a chart of the current data. (The right-click menu on a cell can also open a chart even if this button is hidden.)

toolbar.columns

The column-chooser button, for showing and hiding individual columns.

toolbar.refresh

The refresh button. Re-runs your dataSource fetch, or calls your onRefresh function if you supplied one instead.

toolbar.filters

A toggle button for showing or hiding the filter bar described below. Only appears if the filters property has actually mounted a filter bar to toggle.

toolbar.groups

A checklist of every column that can be grouped by. Without this, there is no way to discover row grouping except by dragging a column header, so it defaults to shown whenever at least one column is marked groupable.

toolbar.headerFilters

A toggle that shows or hides the little filter-funnel icons in each column header, at runtime. Defaults to living inside the settings menu.

toolbar.settings

true or false only. This is the gear-icon dropdown itself. Set it to false to remove it outright — anything you had set to "menu" then falls back to getting its own button instead of disappearing, so you never lose access to a control this way.

The filter bar

Besides the little funnel icon in each column header, ProGrid can show a dedicated surface for filtering across several columns at once — a strip of chips, a sidebar, or a dialog. It is off by default. Both places edit the exact same filters, so they can never disagree with each other.

filters

Pass true for a simple chip bar above the grid, or an object (below) to choose where it appears and how it behaves. Left unset, only the header funnel icons are available.

filters.placement

Where the filter surface appears: "top" (a bar above the body), "left" (a sidebar), "dialog" (a pop-up window), or "none" (the default — no extra surface, just the header funnels).

filters.headerFilters

true or false (default true). Set it to false to remove the column-header funnel icons, so filtering happens only through the surface above.

filters.columns

A list of column names (in the order you want) to limit which columns the filter surface offers. Leaving it unset offers every filterable column.

filters.defaultOpen

true or false. Whether the surface starts open. Defaults to open for the top bar and sidebar, and closed for the dialog.

filters.width

Width of the sidebar, in pixels (default 260). Only applies when placement is "left".

filters.quickFilter

true or false. Moves the free-text search box out of the toolbar and into the filter surface instead.

footer

true or false (default true). Shows or hides the status bar at the bottom of the grid, which reports the row count and how many rows or cells are currently selected.

renderFooter

A function you write to add your own content at the end of the footer, given the same context object (row count, selection count, loading state, refresh function) that renderToolbar receives.

Selecting rows and cells

rowSelection

true or false (default true). Shows or hides the checkbox column used to select whole rows. Turn it off if your own application already has a different way of tracking which rows are selected.

cellSelection

true or false (default true). Lets a person drag to select a rectangular block of cells — like a spreadsheet — with the mouse or keyboard, for copying values out. Turn it off if rows themselves are clickable, since otherwise a plain click both navigates and marks a cell as selected.

Clicks and other row gestures

onRowClick

A function you write, called whenever someone clicks a row. It receives the row so you can read row.original for the underlying data.

onRowDoubleClick

Same idea, for a double-click.

onRowLongPress

Called after someone presses and holds a row for roughly 400 milliseconds — useful as a selection gesture on touch devices.

onNavigate

Called when someone right-clicks a cell that contains a link, so your app can route to it with your own router instead of triggering a full browser page load. Left unset, the grid just navigates the browser there directly.

rowClassName

A function you write that returns a CSS class name for a given row (or nothing). Use it for things like striping, marking a row as disabled, or highlighting rows your own code considers selected.

Detail rows and custom groups

renderDetail

A function you write that returns extra content to show underneath a row once it’s expanded — an order’s line items, for example.

getRowCanExpand

A function you write that decides which rows are even allowed to expand. Only useful alongside renderDetail; without it, every row with detail content can open.

groupRows

A function you write that splits your rows into your own labeled blocks (rather than using ProGrid’s built-in column grouping). Meant for small lists — the result isn’t virtualized, so every row it produces is drawn to the page at once.

Paging

pagination

Pass true for page controls with sensible defaults, or an object (below) to customize them. Left unset (false), every row renders at once with no page controls.

pagination.mode

Either "pages" (numbered pages with next/previous controls, the default) or "infinite" (no controls at all — more rows load automatically as the user scrolls down).

pagination.pageSize

How many rows fit on one page, to start with. If the user changes it, their choice takes priority over this from then on.

pagination.pageSizeOptions

The list of page-size choices offered to the user ("pages" mode only).

pagination.placement

Whether the page controls sit in the "footer" (default) or the "toolbar" ("pages" mode only).

Getting data from a server

By default, ProGrid works entirely with the rows you hand it in data, sorting and filtering them itself in the browser (“client mode”). Once a dataset is too big for that, use one of these to have a server do the sorting, filtering, and paging instead (“server mode”).

dataSource

The simplest way to wire up a server: a function you provide that fetches a page of rows given the grid’s current page, sort, and filters. ProGrid calls it automatically whenever those change, and takes care of showing a loading state, handling errors, and canceling a stale request if a newer one starts first.

rowCount

Used instead of dataSource, when your own application code does the fetching: the total number of rows matching the current filters (not just the ones on the current page), so ProGrid can draw the right number of pages.

aggregates

Also for the do-it-yourself setup: the grand totals your server computed over all matching rows — a sum of every order’s revenue, say, not just the ones on this page — keyed by column. ProGrid shows them in the totals row instead of adding up the page it can see. (With dataSource, they arrive in the response instead.)

onQueryChange

Also used in that same do-it-yourself setup: a function you provide that ProGrid calls whenever the page, sort, filters, search text, or chosen totals change — your cue to go fetch the matching rows yourself and pass them back in through data.

loading

true or false. In the do-it-yourself setup above, tells ProGrid whether to show its loading indicator. (With dataSource, ProGrid tracks this by itself.)

onRefresh

A function you provide to override what the refresh button does — useful in the do-it-yourself setup, where there’s no dataSource for ProGrid to automatically re-run.

serverSide

true or false. Forces server mode on or off. You rarely need to set this yourself — ProGrid already turns server mode on automatically once you supply dataSource or rowCount.

serverOperators

Limits which filter comparisons (“contains”, “is not”, and so on) are offered in the filter menu, to match what your particular API actually understands. Pass true for a conservative default set, or a specific list if your data layer tells you which ones it supports.

Watching and controlling state

Recall from the vocabulary section that “state” means everything about the grid that changes as someone uses it. These properties let you seed a starting point, watch it change, or take ownership of individual pieces.

initialState

Starting values for sorting, filters, pinned/hidden/reordered columns — applied only on the very first render. After that, whatever the user does takes over; this property is never re-applied.

initialGrouping

Which columns to group rows by, on first render only, given as a list of column names.

state

Hands ownership of one or more pieces of state to your own application code. Whatever pieces you list here, ProGrid stops managing itself and simply displays whatever you pass in — you become responsible for updating it (usually together with onStateChange below). Anything you don’t mention stays managed by ProGrid as normal, so it’s common to control just one piece, like { columnFilters }.

onStateChange

A function you provide that ProGrid calls after any state change at all, handing back the complete current state — including pieces it still owns itself. Use it to mirror the grid’s state elsewhere (a URL, your own saved-views feature) without necessarily taking control of any of it via state.

Remembering a user’s setup

Turns on saving and restoring the layout someone builds — column widths and order, sort, filters, page size, and more — so it’s still there the next time they open the grid. Off unless you configure it. See Saving layout and filters for the full walkthrough.

persist

An object turning this feature on. It always needs at least a key — think of it as a name for “this particular saved layout.”

persist.key

Required. A unique name for what’s being saved. Point two different grids at the same key and they’ll share one saved layout; give a grid two different keys over time and you’ve built a way to switch between saved views.

persist.local

Saves to the browser’s localStorage, which survives closing and reopening the browser entirely. Pass true for a sensible default set of things to remember (columns, sort, filters, grouping, pivot, page size), or a specific list if you want to be selective.

persist.session

The same idea, but saved to sessionStorage instead — cleared once the browser tab closes, rather than surviving indefinitely.

persist.adapter

Instead of (or alongside) the browser storage above, save to your own backend — a database row tied to the signed-in user, for example. You provide simple load/save functions; ProGrid calls them at the right times.

persist.slices

Which pieces specifically get routed to your custom adapter, if you don’t want it to receive the same default set as local/session.

persist.version

A number you bump whenever your columns change in a way that makes old saved layouts meaningless (renaming or removing a column, say) — bumping it discards every previously saved layout instead of trying to apply it to columns that no longer match.

persist.migrate

An escape hatch for when you’d rather convert an old saved layout than throw it away: a function you provide that receives the old raw saved value and returns a converted one (or null to discard it after all).

persist.debounceMs

How long ProGrid waits after the last change before actually writing to storage, in milliseconds (default 300) — so, say, dragging a column doesn’t trigger a save on every pixel of movement. Pass 0 to save immediately on every change instead.

persist.onError

A function you provide that’s called if a save or load fails (storage full, unavailable, or corrupted, for instance). ProGrid always falls back to showing the default layout rather than breaking.

Live, streaming data

For a grid fed by a live source — a websocket, a polling job — that patches individual rows instead of replacing the whole dataset every time. See Live data and transactions for the complete picture; ProGrid doesn’t include the network connection itself, only the plumbing for applying updates efficiently once you have one.

liveUpdates

Pass true, or an object (below) to tune the behavior. Turns on a set of commands (reachable through the ref) for adding, updating, or removing individual rows without re-fetching everything. Requires getRowId.

liveUpdates.batchMillis

How many milliseconds of incoming updates get grouped into a single screen update (default 60) — so a source pushing dozens of changes a second still only redraws the grid a reasonable number of times per second, instead of once per change.

liveUpdates.flash

true or false (default true). Briefly highlights a cell whose value just changed, so updates are noticeable rather than silent.

liveUpdates.flashMillis

How long that highlight lasts, in milliseconds (default 900).

liveUpdates.aggMillis

How often totals and aggregates (sums, averages shown in group/pivot rows) are recalculated while updates are streaming in, in milliseconds (default 250) — recalculating on every single incoming row would be needlessly expensive at high update rates.

liveUpdates.maxRows

An optional cap on how many rows the grid keeps in memory, for a feed that only ever grows — once new rows arrive past this limit, the oldest are dropped.

liveUpdates.onFlush

A function you provide that’s called after a batch of updates is applied, telling you exactly what was added, updated, removed, or didn’t match any existing row.

Per-column settings (meta)

Recall from the vocabulary section that meta is a small object you add to each column definition, next to TanStack’s own header/accessorKey fields. Everything below goes inside it, e.g. { accessorKey: "revenue", header: "Revenue", meta: { type: "number", align: "right" } }.

meta.type

What kind of value the column holds: "string", "number", "date", "boolean", or "array" (for a column whose cells hold a list of tags, say). This one setting is what gives a column its filter — it decides which comparisons make sense (“greater than” for a number, but not a string) and which editor the filter popover shows. It also tells the chart whether the column is a measure (a number to total up) or something to group by. Skip it on a column that shouldn’t be filterable at all, like a raw internal ID.

meta.label

A short, friendly name for the column, used in menus, the column chooser, and copied text — separate from whatever header renders on screen. Set this whenever your header isn’t plain text (an icon, a custom component), since those surfaces can’t otherwise guess a readable name for the column.

meta.filterable

false removes the filter from a column that would otherwise get one from its type — for a column typed only so a chart or a total can read it correctly, without wanting a filter for it too.

meta.filterVariant

Overrides which filter editor is shown, on the rare occasion the one implied by type isn’t right — "text", "number", "set" (a checkbox list), "date", or "boolean".

meta.filterOptions

The list of choices to show for a checkbox-list (“set”) filter — plain strings, or { value, label } objects when what’s shown to the user should differ from what’s actually sent (a code like "N" displayed as “New”). Required if the grid gets its data from a server, since otherwise ProGrid would only know the choices present on the current page.

meta.filterField

The field name your server-side API actually expects for this column’s filters and sorting, when it’s different from the column’s own name — for example, a column that displays a region’s name but filters by its ID.

meta.filterCondition

Forces every filter on this column to use one specific comparison code understood by your API, for a field that only ever accepts one kind of condition.

meta.align

"left", "right", or "center" — text alignment for both the header and the cells. Number columns default to right-aligned.

meta.groupable

true lets this column be used to group rows (or, in a pivot, as a row dimension).

meta.pivotable

true lets this column be dragged onto the pivot’s column axis.

meta.aggregable

true lets a numeric column be totaled up (summed, averaged, and so on) in grouped rows.

meta.chartable

false keeps a column out of the chart’s field pickers even though it has a type — for a numeric-looking column, like a reference code, that’s meaningless to plot.

meta.dateGranularity

For a type: "date" column: "day" (the default) compares whole calendar days in the reader’s own timezone, so a filter for “the 15th” matches every row stamped that day regardless of time. "instant" compares exact timestamps instead, for the rarer case where the time of day actually matters.

meta.defaultAgg

Which aggregation (sum, average, count, and so on) a numeric column starts with the first time it’s dropped into a group total or pivot. Defaults to sum.

meta.formatValue

A function you provide that turns a raw value into display text — used consistently for cells, totals, pivot cells, and chart labels/tooltips, so a currency or percentage column looks the same everywhere it appears.

meta.signed

true colors a number green when it’s zero or positive and red when it’s negative — applied to cells, totals, and grouped sums alike.

meta.cellClassName

An extra CSS class name added to every cell in this column.

meta.headerClassName

An extra CSS class name added to this column’s header cell.

meta.cellStyle

Inline CSS styles applied to every cell in this column.

meta.headerIcon

Content — usually an icon — shown in place of the text header label. The sort arrow, pin icon, resize handle, and filter icon still render around it as normal.

meta.tooltip

Plain text shown as a native tooltip when hovering the column header.

meta.truncate

true by default: long cell content is clipped to a single line with an ellipsis. Set false for a column that’s meant to wrap onto multiple lines on purpose.

The few fields that come from TanStack

Two column fields you’ll use constantly, header and cell, are not ProGrid inventions — they’re standard TanStack Table fields that sit alongside meta in the same column object, not inside it.

header

Either a plain string (the usual case) or a function returning any React content, for a custom header — an icon next to the label, for instance. If you use a function, also set meta.label so surfaces that need plain text (the column chooser, copy-to-clipboard) still show something readable.

cell

A function returning custom React content for every cell in the column, replacing the default plain-text rendering — a colored status badge instead of raw text, for example.

{
  accessorKey: "status",
  header: "Status",
  cell: ({ getValue }) => {
    const status = String(getValue())
    return <span className={`badge badge--${status}`}>{status}</span>
  },
}
accessorKey / accessorFn

Which field of your row object this column reads. accessorKey is the simple case — the name of a property, like "revenue". accessorFn is a function, for when the value needs to be computed from more than one field.

size

The column’s starting width, in pixels. The user can still resize it afterward by dragging the column’s edge.

Pivot tables

A pivot is the same idea as a spreadsheet PivotTable: instead of one row per record, you build a cross-tab summary — pick which columns become row groups, which become column groups, and which numbers get totaled up where the two meet. These properties are read as advanced/optional; see Pivot & charts for a guided walkthrough with pictures.

initialPivot

Turns pivot mode on and/or seeds its starting setup, on first render only. Pass true to turn pivot mode on with nothing configured yet, or an object (below) to start with fields already chosen.

pivotOptions

Presentation choices for the pivot — how it’s laid out and capped — described field by field below.

What goes into a pivot’s setup

rows

The list of columns used to build row groups — for example, group by Region, then by Salesperson within each region.

columns

The same idea, but for column groups instead — for example, one column per Quarter.

values

The list of numbers to calculate at each intersection of a row group and column group — “sum of Revenue,” “average of Units,” or a formula built from other values already in the list, like Revenue divided by Units.

filters

Filters that narrow down the source rows before any totals are calculated at all — “only this year,” “exclude these regions.”

Settings on one row or column field

colId

Which column this row-group or column-group level is built from.

label

Overrides the name shown for this level, instead of the column’s own label.

sort

How this level’s members are ordered — alphabetically/numerically by value, by one of the pivot’s calculated numbers, or in a manual order you specify explicitly.

subtotal

true or false (default true). Whether this level gets its own subtotal row or column.

subtotalPlacement

"top" or "bottom" (default) — whether the subtotal appears above or below the members it’s totaling.

bucket

For a date column: groups values into calendar periods — day, week, month, quarter, or year — instead of one group per exact date.

exclude

Specific members to hide from this level.

Settings on one value (measure)

colId / agg

Which column to total up, and how — sum, average, count, minimum, maximum, and so on.

label

Overrides the generated heading (like “Sum of Revenue”) with your own text.

showAs

Reports the same underlying number a different way, without changing what’s actually calculated — as a percentage of the grand total, a percentage of its row or column, a running total, a rank, or the difference from a previous period. The raw number underneath is preserved either way, so drilling through or exporting still gets the real figure.

formatValue

Overrides how this one measure’s numbers are displayed, instead of using the source column’s own meta.formatValue.

kind: "calc", id, expr

Instead of totaling one column, a calculated value combines other values already defined, by a formula referencing their labels — "[Revenue] / [Units]" for an average price, say. It needs its own id and label since it has no source column to be named after.

Presentation (pivotOptions)

rowLayout

"outline" (default) indents every row level into a single column, the way a spreadsheet PivotTable usually looks. "tabular" gives each row level its own column instead.

grandTotalRow / grandTotalColumn

true or false (both default true). Whether an overall total row and/or column are shown.

pinGrandTotalColumn

true or false (default true). Keeps the grand total column visible while scrolling horizontally.

initialExpandDepth

How many levels deep the pivot starts expanded (default 1).

drillThrough

true or false (default true). Lets someone click a value cell to see the underlying rows that were totaled to produce it.

fieldPanelWidth

Width, in pixels, of the docked panel used to drag fields into rows/columns/values (default 280).

blankLabel

What to show for a group whose dimension value is missing/blank.

limits

Hard ceilings on how large the pivot is allowed to grow (maximum column groups, maximum row nodes) — a safety net so accidentally pivoting on a column with millions of unique values truncates the result instead of freezing the browser tab.

Controlling the grid from outside (the ref)

Normally you talk to ProGrid only through properties. A ref is React’s way of also handing you a set of direct commands you can call whenever you like — closer to pressing buttons on a remote control than describing what should be true. Attach one when an external toolbar, keyboard shortcut, or other custom UI needs to drive the grid.

refresh()

Re-runs the current server request. Does nothing in client mode, where there’s no request to re-run.

setPage(page) / setPageSize(size)

Jump to a specific page, or change how many rows are shown per page.

setSort(sort) / setFilters(filters) / setQuickFilter(text)

Set the sort order, the column filters, or the search box text, programmatically.

reset()

Clears sorting, filters, and search text, and returns to the first page.

clearFilters()

The same as reset(), but leaves sorting alone — what a “clear all filters” button should call.

getState() / getQuery()

getState() returns the complete current state (the same shape onStateChange reports). getQuery() returns the normalized request the grid would currently send to a server.

resetLayout()

Restores column widths, order, visibility, and pinning back to their starting values.

setPivotMode(on?) / setPivotConfig(config)

Turn pivot mode on or off, or replace its whole configuration at once.

expandPivot(axis, depth)

Opens or closes a pivot axis to a given depth, or pass "all" to fully expand it — a reliable way back to a known shape after someone has expanded and collapsed groups by hand.

exportPivot(options?)

Returns the current pivot as tab- or comma-separated text, ready to paste into a spreadsheet. Pass { raw: true } to get the underlying numbers instead of the formatted display text.

clearPersistedState()

Erases whatever persist has saved under the current key, and also resets the layout and clears filters/sort/search/page — a full “forget my settings” action.

applyTransaction(tx) / applyTransactionAsync(tx)

Add, update, or remove specific rows in place — the commands behind live updates. The Async version queues the change to be grouped with others arriving in the same short window; the non-async version applies immediately and tells you what happened.

flushTransactions()

Applies any queued async transactions right now, instead of waiting for the batching window to close.

updateRows(rows)

A shortcut for applying an update transaction with just a list of rows to replace.

getRows()

Returns the rows currently held by the grid, including anything changed by live-update transactions.

table

An escape hatch: the raw underlying TanStack Table instance, for the rare case where you need an API the ref doesn’t already expose a shortcut for.