@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
customContextMenuItems?
optionalcustomContextMenuItems?: (field) =>object[]
Customize the context menu items for a specific field.
Parameters
field
PivotField<TRow>
Returns
object[]
data
data:
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.
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) or 'comfortable' (36px). 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.)
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.
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.
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
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
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
onImportData?
optionalonImportData?: (data) =>void
Callback fired when data is imported via the UI.
Parameters
data
TRow[]
Returns
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.
onRefresh?
optionalonRefresh?: () =>void
Callback fired when the refresh button is clicked.
Returns
void
onToggleChart?
optionalonToggleChart?: () =>void
Callback fired when chart toggle is clicked.
Returns
void
previewImport?
optionalpreviewImport?:boolean
When true, UI imports open a preview + column-mapping step before applying.
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.
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.