@kanunilabs/pivotgrid-react / BasePivotGridProps
Interface: BasePivotGridProps<TRow>
Props for the BasePivotGrid component. This is the enterprise-grade data orchestration layer for analytics.
Type Parameters
TRow
TRow
Properties
advancedExport?
optionaladvancedExport?:boolean
Enables the Enterprise-only styled Excel & PDF export items in the footer.
Set by EnterprisePivotGrid; in the Community build those items render locked.
asyncTransactionWait?
optionalasyncTransactionWait?:number
How long ref.applyTransactionAsync collects transactions before applying them together. Default 50 ms.
chartIntegrationOptions?
optionalchartIntegrationOptions?:PivotChartIntegrationOptions&object
Configuration for chart synchronization.
Type Declaration
chartType?
optionalchartType?:string
columnar?
optionalcolumnar?:boolean
Keep the rows as typed columns instead of row objects (Enterprise, EnterprisePivotGrid only; B.111): for
1–2 million rows. Read when the grid is created. See PivotControllerOptions.columnar.
customContextMenuItems?
optionalcustomContextMenuItems?: (field) =>object[]
Customize the context menu items for a specific field.
Parameters
field
PivotField<TRow>
Returns
object[]
dark?
optionaldark?:boolean
The built-in dark look (the DataGrid's dark palette). A palette decides its own mode and wins.
data
data:
TRow[] |PivotRowChunk<TRow>
The raw tabular data array. A NEW array replaces every row; passing the
same array again (any re-render) does not, so rows changed through
ref.applyTransaction stay changed; a new empty array clears them. With columnar, also a { columns, rows }
chunk, the same while its rows and columns arrays are (B.111).
defaultColumnWidths?
optionaldefaultColumnWidths?:PivotColumnWidthDefaults
Starting widths in pixels: { rowHeader, data } for every row-header
column and every data column. Defaults 150 and 95. A width the user drags
(or ref.setColumnWidths writes) still wins; see
PivotControllerState.columnWidths for its keys.
density?
optionaldensity?:PivotDensity
Row rhythm: 'compact' (24px rows, one size smaller type), 'normal'
(28px, the default), 'comfortable' (36px) or 'touch' (45px rows and headers, every target 44px, for a touch screen). Changing it repaints in
place, without re-running the pivot engine.
dictionary?
optionaldictionary?:Partial<PivotDictionary>
Dictionary for localized strings (i18n).
disabled?
optionaldisabled?:boolean
Disables all interactive features (drag & drop, expand/collapse, context menu, filtering, etc.)
fieldChooserMode?
optionalfieldChooserMode?:"modal"|"panel"
How the field chooser opens (B.37). 'modal' (the default): a
floating window over a backdrop that covers the pivot. 'panel': a panel
beside the pivot, at its end side, with no backdrop: the pivot stays
usable, and a field drags both ways between the two — from the list to
any strip or row header, from a pivot chip back to the list (which hides
it). The footer button, openFieldChooser and closeFieldChooser open
and close it either way. On a screen 768px wide or narrower the panel
falls back to the full-screen chooser. Its width is the CSS variable
--pivot-chooser-panel-width (default 320px).
fieldGroupTools?
optionalfieldGroupTools?:PivotFieldGroupTools
Field groups on (B.118-B.120): EnterprisePivotGrid passes core's pivotFieldGroupTools. Not for apps — groups
are Enterprise; without it group on a field does nothing and nothing of a group is drawn.
fields?
optionalfields?:PivotField<TRow>[]
Controlled field configuration. If provided, component acts as controlled.
gridId?
optionalgridId?:string
Optional identifier for the grid instance. Used for report storing and caching.
initialFields?
optionalinitialFields?:PivotField<TRow>[]
Initial field configuration (Uncontrolled mode).
keyboardNavigation?
optionalkeyboardNavigation?:object
Configuration for keyboard navigation and accessibility.
enabled
enabled:
boolean
layout?
optionallayout?:PivotLayoutState
Controlled layout configuration.
loading?
optionalloading?:boolean
The rows are still being fetched: while true, a grid with no result shows
its loader instead of the "no data" text (mount with data={[]}, fill it
with applyTransactionAsync, then set it to false). A result already on
screen stays. Exports do not wait for it.
locale?
optionallocale?:PivotLocale
Interface language: 'en', 'tr', 'ar', 'de', 'fr', 'es', 'it', 'pt', 'ru', 'zh-CN', 'ja' or 'ko'.
Defaults to 'en'. Also sets the number formatting, and right-to-left for 'ar' (see rtl).
maxColumns?
optionalmaxColumns?:number
Most column members drawn (default 1000); past it the grid says so and
totals still count all the data. 0 or Infinity turns the cap off.
maxLiveOpenNodes?
optionalmaxLiveOpenNodes?:number
Default 500,000: while rows stream in under expand-all, a live compute that would build more row nodes than this is held back until the feed ends (or a reader action, an export, ~2 s without new rows, a shown result 5 minutes old). 0 or Infinity turns it off; see the core option.
maxRestoredOpenNodes?
optionalmaxRestoredOpenNodes?:number
Opt-in (off by default): most row nodes the grid may hold for an open state put back from storage or a report (under '*' closed branches count too); see the core option.
onAfterPivotCalculate?
optionalonAfterPivotCalculate?: (result) =>void
Fired after the Pivot matrix compute cycle completes successfully.
Parameters
result
PivotEngineResult
Returns
void
onBeforePivotCalculate?
optionalonBeforePivotCalculate?: () =>void
Fired immediately before the Pivot matrix compute cycle begins.
Returns
void
onCellClick?
optionalonCellClick?: (e) =>void
Fired when any cell is clicked (data cells, row headers, grand totals). Replaces the deprecated onDrillDown handler. This is the single source of truth for cell interactions.
Parameters
e
CellClickEvent<TRow>
Returns
void
onCellPrepared?
optionalonCellPrepared?: (e) =>void
Fired after a cell is prepared to allow modifications.
Parameters
e
CellPreparedEvent<TRow>
Returns
void
onChartStateLoaded?
optionalonChartStateLoaded?: (chartState) =>void
Callback to receive loaded chart state.
Parameters
chartState
PivotChartIntegrationOptions & object
Returns
void
onChartSync?
optionalonChartSync?: (syncResult) =>void
Callback to receive chart integration payload.
Parameters
syncResult
Returns
void
onComputingChange?
optionalonComputingChange?: (computing) =>void
The pivot started (true) or finished (false) computing a change — data,
fields, a filter, an expand. While it is true the table on screen is the
previous result; exportData waits for false by itself (B.31).
The export waits without a time limit, a slow serverSource.compute
included. Print and clipboard run after the wait, so a browser may refuse
them once the click that asked for them has expired.
Parameters
computing
boolean
Returns
void
onCopy?
optionalonCopy?: (event) =>void
Ctrl/Cmd+C copied the selected cells (B.99): the tab-separated text, the same cells as an html table, and the
size. The copy goes through the browser's own copy event, so it works on a plain-HTTP page too.
Parameters
event
PivotCopyInfo
Returns
void
onCopyError?
optionalonCopyError?: (error,info) =>void
A Ctrl/Cmd+C did not reach the clipboard (B.99): reason is 'insecure-context' (no clipboard on a plain-HTTP
page and no copy event), 'permission-denied' (the browser refused), 'empty-selection' (the focus was in the
grid with nothing selected) or 'unsupported'. Show the user something; the grid does not.
Parameters
error
PivotCopyError
info
reason
PivotCopyErrorReason
Returns
void
onError?
optionalonError?: (error) =>void
Fired when a critical engine error occurs.
Parameters
error
Error
Returns
void
onExporting?
optionalonExporting?: (e) =>void
Fired when an export action is initiated. Can be canceled.
Parameters
e
Returns
void
onFieldGroupChange?
optionalonFieldGroupChange?: (e) =>void
A field group changed from the screen (Enterprise, B.120): created, joined, left, renamed, ungrouped, collapsed or opened. After the change.
Parameters
e
PivotFieldGroupChangeEvent<TRow>
Returns
void
onFieldMove?
optionalonFieldMove?: (e) =>void|Promise<void>
Fired when a field is moved within the PivotGrid (drag & drop). Provides a validate/cancel hybrid model. If it returns a Promise, the component awaits validation before committing the DND state.
Parameters
e
Returns
void | Promise<void>
onFieldsChange?
optionalonFieldsChange?: (fields) =>void
Fired when fields configuration changes.
Parameters
fields
PivotField<TRow>[]
Returns
void
onLargeExport?
optionalonLargeExport?: (info) =>boolean|void|Promise<boolean|void>
Asked before a styled Excel export gives way to the plain .xls one (over
100,000 list rows or 150,000 pivot cells); return false to cancel (B.23).
Parameters
info
LargeExportInfo
Returns
boolean | void | Promise<boolean | void>
onLayoutChange?
optionalonLayoutChange?: (layout) =>void
Fired when layout options change.
Parameters
layout
Returns
void
onOpenFullScreenChart?
optionalonOpenFullScreenChart?: () =>void
Returns
void
Deprecated
NEVER FIRES. Declared, never destructured, never called — there
is no code path that reaches it, and there never was. The doc comment here
used to read "fired when the full screen chart icon is clicked", which is
the reason it survived: it looked implemented in the API reference.
Use chartIntegrationOptions instead. Removed in the next major.
onReady?
optionalonReady?: (controller) =>void
The grid's controller, once, after its first render (again only if a new gridId gives it a new one). Keep it
for anything that runs while the grid may be hidden: React sets ref.current to null while
<Activity mode="hidden"> hides the grid, and the controller keeps taking transactions then (B.108).
Parameters
controller
PivotController<TRow>
Returns
void
onRefresh?
optionalonRefresh?: () =>void
Callback fired when the refresh button is clicked.
Returns
void
onRestoredExpansionCollapsed?
optionalonRestoredExpansionCollapsed?: (e) =>void
The open state put back was dropped because the tree would not fit in memory; the grid opened collapsed (once; twice under React StrictMode in development).
Parameters
e
limit
number
nodes
number
Returns
void
onSelectionChange?
optionalonSelectionChange?: (event) =>void
Every change of the selected data cells (B.25): count, and cells
(paths, data field, value, kind) built when read. On Enterprise, Shift
extends the selection, Ctrl/Cmd adds a rectangle, and on a touch screen a
long press adds one and a drag grows it.
Parameters
event
Returns
void
onToggleChart?
optionalonToggleChart?: () =>void
Callback fired when chart toggle is clicked.
Returns
void
palette?
optionalpalette?:string
A colour scheme by id — one of the 36 packaged ones ('nord',
'graphite'…, with @kanunilabs/pivotgrid-react/themes/<id>.css imported
after styles.css) or your own from the Theme Builder. The same name as the
DataGrid's palette, so one value colours both. Wins over theme.id.
registry?
optionalregistry?:PivotEngineRegistry
The plugin registry containing custom functions and formatters.
renderCalculatedFieldModal?
optionalrenderCalculatedFieldModal?: (props) =>ReactNode
Slot for injecting Enterprise Calculated Field Modal
Parameters
props
any
Returns
ReactNode
renderNodeContextMenu?
optionalrenderNodeContextMenu?: (props) =>ReactNode
Overrides the built-in node context menu (Community since 2026-08-30); omit to get the default right-click expand/collapse menu
Parameters
props
any
Returns
ReactNode
renderPrefilterBuilder?
optionalrenderPrefilterBuilder?: (props) =>ReactNode
Slot for injecting Enterprise Prefilter Builder
Parameters
props
any
Returns
ReactNode
rowKey?
optionalrowKey?:PivotRowKeyResolver<TRow>
What identifies a row for ref.applyTransaction: a field name, or a
function returning a string or number. Without it rows are matched by
object identity.
rtl?
optionalrtl?:boolean
Right-to-Left (RTL) mode. Defaults to false (except for 'ar').
search?
optionalsearch?:boolean
A search box in the footer: shows only the row members whose caption
contains the text, on top of the reader's own filters. Default false.
ref.setSearchText(text) works either way.
serverSource?
optionalserverSource?:PivotServerSource
Server-side pivot (Enterprise): the server aggregates; data is not read.
stateStoring?
optionalstateStoring?:PivotStateStoringConfig
Configuration for state storing (localStorage, sessionStorage, etc).
striped?
optionalstriped?:boolean
Apply zebra striping to the data rows.
theme?
optionaltheme?:PivotTheme
Custom theme configuration.
toolbar?
optionaltoolbar?:PivotToolbarConfig
Configuration for the toolbar visibility and features.
touchChipTap?
optionaltouchChipTap?:PivotTouchChipTap
What a short tap on a field chip does on a touch screen: 'sort' (the
default, as a click does), 'menu' (opens the chip's menu) or 'none'.
touchDragDelay?
optionaltouchDragDelay?:number
How long (ms) a finger holds still on a field chip before it drags (a customer B.35). Moving sooner scrolls the page instead. Default 200. Holding still a further 350 ms opens the chip's menu. A mouse or a pen drags after 8 px.
upgradeUrl?
optionalupgradeUrl?:string
URL opened when a Community user clicks a locked Enterprise export item (e.g. your pricing / Enterprise sales page).
workerUrl?
optionalworkerUrl?:string|URL
Explicit URL for the engine Web Worker script. Required in bundlers that
cannot statically resolve the default new URL('./pivot.worker.js', import.meta.url) (e.g. Next.js). Copy the worker from
@kanunilabs/pivotgrid-core/dist/pivot.worker.js into a served path and
point this at it, e.g. /kanunilabs/pivot.worker.js.