Documentation

@kanunilabs/pivotgrid-react


@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?

optional advancedExport?: boolean

Enables the Enterprise-only styled Excel & PDF export items in the footer. Set by EnterprisePivotGrid; in the Community build those items render locked.


chartIntegrationOptions?

optional chartIntegrationOptions?: PivotChartIntegrationOptions & object

Configuration for chart synchronization.

Type Declaration

chartType?

optional chartType?: string


customContextMenuItems?

optional customContextMenuItems?: (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.


dictionary?

optional dictionary?: Partial<PivotDictionary>

Dictionary for localized strings (i18n).


disabled?

optional disabled?: boolean

Disables all interactive features (drag & drop, expand/collapse, context menu, filtering, etc.)


fields?

optional fields?: PivotField<TRow>[]

Controlled field configuration. If provided, component acts as controlled.


gridId?

optional gridId?: string

Optional identifier for the grid instance. Used for report storing and caching.


initialFields?

optional initialFields?: PivotField<TRow>[]

Initial field configuration (Uncontrolled mode).


keyboardNavigation?

optional keyboardNavigation?: object

Configuration for keyboard navigation and accessibility.

enabled

enabled: boolean


layout?

optional layout?: PivotLayoutState

Controlled layout configuration.


locale?

optional locale?: PivotLocale

Locale for the grid (tr, en, ar). Defaults to tr.


onAfterPivotCalculate?

optional onAfterPivotCalculate?: (result) => void

Fired after the Pivot matrix compute cycle completes successfully.

Parameters

result

PivotEngineResult

Returns

void


onBeforePivotCalculate?

optional onBeforePivotCalculate?: () => void

Fired immediately before the Pivot matrix compute cycle begins.

Returns

void


onCellClick?

optional onCellClick?: (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?

optional onCellPrepared?: (e) => void

Fired after a cell is prepared to allow modifications.

Parameters

e

CellPreparedEvent<TRow>

Returns

void


onChartStateLoaded?

optional onChartStateLoaded?: (chartState) => void

Callback to receive loaded chart state.

Parameters

chartState

PivotChartIntegrationOptions & object

Returns

void


onChartSync?

optional onChartSync?: (syncResult) => void

Callback to receive chart integration payload.

Parameters

syncResult

ChartSyncResult

Returns

void


onError?

optional onError?: (error) => void

Fired when a critical engine error occurs.

Parameters

error

Error

Returns

void


onExporting?

optional onExporting?: (e) => void

Fired when an export action is initiated. Can be canceled.

Parameters

e

ExportingEvent

Returns

void


onFieldMove?

optional onFieldMove?: (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

FieldMoveEvent

Returns

void | Promise<void>


onFieldsChange?

optional onFieldsChange?: (fields) => void

Fired when fields configuration changes.

Parameters

fields

PivotField<TRow>[]

Returns

void


onImportData?

optional onImportData?: (data) => void

Callback fired when data is imported via the UI.

Parameters

data

TRow[]

Returns

void


onLayoutChange?

optional onLayoutChange?: (layout) => void

Fired when layout options change.

Parameters

layout

PivotLayoutState

Returns

void


onOpenFullScreenChart?

optional onOpenFullScreenChart?: () => 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?

optional onRefresh?: () => void

Callback fired when the refresh button is clicked.

Returns

void


onToggleChart?

optional onToggleChart?: () => void

Callback fired when chart toggle is clicked.

Returns

void


previewImport?

optional previewImport?: boolean

When true, UI imports open a preview + column-mapping step before applying.


registry?

optional registry?: PivotEngineRegistry

The plugin registry containing custom functions and formatters.


renderCalculatedFieldModal?

optional renderCalculatedFieldModal?: (props) => ReactNode

Slot for injecting Enterprise Calculated Field Modal

Parameters

props

any

Returns

ReactNode


renderNodeContextMenu?

optional renderNodeContextMenu?: (props) => ReactNode

Slot for injecting Enterprise Node Context Menu

Parameters

props

any

Returns

ReactNode


renderPrefilterBuilder?

optional renderPrefilterBuilder?: (props) => ReactNode

Slot for injecting Enterprise Prefilter Builder

Parameters

props

any

Returns

ReactNode


rtl?

optional rtl?: boolean

Right-to-Left (RTL) mode. Defaults to false (except for 'ar').


stateStoring?

optional stateStoring?: PivotStateStoringConfig

Configuration for state storing (localStorage, sessionStorage, etc).


striped?

optional striped?: boolean

Apply zebra striping to the data rows.


theme?

optional theme?: PivotTheme

Custom theme configuration.


toolbar?

optional toolbar?: PivotToolbarConfig

Configuration for the toolbar visibility and features.


upgradeUrl?

optional upgradeUrl?: string

URL opened when a Community user clicks a locked Enterprise export item (e.g. your pricing / Enterprise sales page).


workerUrl?

optional workerUrl?: 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.