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:
rowOne 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.
columnOne 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.
cellOne value on screen — the intersection of one row and one column. “Revenue for this order” is a cell.
headerThe label at the top of a column, and the row of labels as a whole.
metaA 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.
stateEverything 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",
},
},
]dataYour 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.)
columnsA 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.
getRowIdA 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
heightHow 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.
maxHeightA 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.
rowHeightHow 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.
columnVirtualizationtrue 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.
fitColumnstrue 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.
classNameAn extra CSS class name to add to the grid’s outer wrapper, for styling hooks from your own stylesheet.
localeEither "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.
titleOptional text shown at the start of the toolbar, if you want the grid to display its own heading.
emptyMessageWhat 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.
toolbarPass 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.
renderToolbarA 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.
renderToolbarEndThe 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.quickFiltertrue 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.expandThe “expand all / collapse all” buttons, which only appear at all once rows are grouped.
toolbar.pivotThe button that switches the grid into pivot (cross-tab) mode. See pivot tables.
toolbar.chartThe 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.columnsThe column-chooser button, for showing and hiding individual columns.
toolbar.refreshThe refresh button. Re-runs your dataSource fetch, or calls your onRefresh function if you supplied one instead.
toolbar.filtersA 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.groupsA 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.headerFiltersA toggle that shows or hides the little filter-funnel icons in each column header, at runtime. Defaults to living inside the settings menu.
toolbar.settingstrue 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.
filtersPass 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.placementWhere 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.headerFilterstrue or false (default true). Set it to false to remove the column-header funnel icons, so filtering happens only through the surface above.
filters.columnsA 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.defaultOpentrue or false. Whether the surface starts open. Defaults to open for the top bar and sidebar, and closed for the dialog.
filters.widthWidth of the sidebar, in pixels (default 260). Only applies when placement is "left".
filters.quickFiltertrue or false. Moves the free-text search box out of the toolbar and into the filter surface instead.
The footer
footertrue 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.
renderFooterA 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
rowSelectiontrue 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.
cellSelectiontrue 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
onRowClickA function you write, called whenever someone clicks a row. It receives the row so you can read row.original for the underlying data.
onRowDoubleClickSame idea, for a double-click.
onRowLongPressCalled after someone presses and holds a row for roughly 400 milliseconds — useful as a selection gesture on touch devices.
onNavigateCalled 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.
rowClassNameA 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
renderDetailA function you write that returns extra content to show underneath a row once it’s expanded — an order’s line items, for example.
getRowCanExpandA 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.
groupRowsA 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
paginationPass 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.modeEither "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.pageSizeHow many rows fit on one page, to start with. If the user changes it, their choice takes priority over this from then on.
pagination.pageSizeOptionsThe list of page-size choices offered to the user ("pages" mode only).
pagination.placementWhether 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”).
dataSourceThe 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.
rowCountUsed 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.
aggregatesAlso 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.)
onQueryChangeAlso 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.
loadingtrue or false. In the do-it-yourself setup above, tells ProGrid whether to show its loading indicator. (With dataSource, ProGrid tracks this by itself.)
onRefreshA 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.
serverSidetrue 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.
serverOperatorsLimits 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.
initialStateStarting 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.
initialGroupingWhich columns to group rows by, on first render only, given as a list of column names.
stateHands 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 }.
onStateChangeA 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.
persistAn object turning this feature on. It always needs at least a key — think of it as a name for “this particular saved layout.”
persist.keyRequired. 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.localSaves 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.sessionThe same idea, but saved to sessionStorage instead — cleared once the browser tab closes, rather than surviving indefinitely.
persist.adapterInstead 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.slicesWhich pieces specifically get routed to your custom adapter, if you don’t want it to receive the same default set as local/session.
persist.versionA 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.migrateAn 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.debounceMsHow 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.onErrorA 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.
liveUpdatesPass 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.batchMillisHow 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.flashtrue or false (default true). Briefly highlights a cell whose value just changed, so updates are noticeable rather than silent.
liveUpdates.flashMillisHow long that highlight lasts, in milliseconds (default 900).
liveUpdates.aggMillisHow 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.maxRowsAn 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.onFlushA 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.typeWhat 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.labelA 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.filterablefalse 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.filterVariantOverrides 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.filterOptionsThe 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.filterFieldThe 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.filterConditionForces 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.groupabletrue lets this column be used to group rows (or, in a pivot, as a row dimension).
meta.pivotabletrue lets this column be dragged onto the pivot’s column axis.
meta.aggregabletrue lets a numeric column be totaled up (summed, averaged, and so on) in grouped rows.
meta.chartablefalse 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.dateGranularityFor 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.defaultAggWhich 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.formatValueA 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.signedtrue 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.cellClassNameAn extra CSS class name added to every cell in this column.
meta.headerClassNameAn extra CSS class name added to this column’s header cell.
meta.cellStyleInline CSS styles applied to every cell in this column.
meta.headerIconContent — 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.tooltipPlain text shown as a native tooltip when hovering the column header.
meta.truncatetrue 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.
headerEither 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.
cellA 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 / accessorFnWhich 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.
sizeThe 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.
initialPivotTurns 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.
pivotOptionsPresentation choices for the pivot — how it’s laid out and capped — described field by field below.
What goes into a pivot’s setup
rowsThe list of columns used to build row groups — for example, group by Region, then by Salesperson within each region.
columnsThe same idea, but for column groups instead — for example, one column per Quarter.
valuesThe 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.
filtersFilters 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
colIdWhich column this row-group or column-group level is built from.
labelOverrides the name shown for this level, instead of the column’s own label.
sortHow 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.
subtotaltrue 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.
bucketFor a date column: groups values into calendar periods — day, week, month, quarter, or year — instead of one group per exact date.
excludeSpecific members to hide from this level.
Settings on one value (measure)
colId / aggWhich column to total up, and how — sum, average, count, minimum, maximum, and so on.
labelOverrides the generated heading (like “Sum of Revenue”) with your own text.
showAsReports 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.
formatValueOverrides how this one measure’s numbers are displayed, instead of using the source column’s own meta.formatValue.
kind: "calc", id, exprInstead 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 / grandTotalColumntrue or false (both default true). Whether an overall total row and/or column are shown.
pinGrandTotalColumntrue or false (default true). Keeps the grand total column visible while scrolling horizontally.
initialExpandDepthHow many levels deep the pivot starts expanded (default 1).
drillThroughtrue or false (default true). Lets someone click a value cell to see the underlying rows that were totaled to produce it.
fieldPanelWidthWidth, in pixels, of the docked panel used to drag fields into rows/columns/values (default 280).
blankLabelWhat to show for a group whose dimension value is missing/blank.
limitsHard 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.
tableAn 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.