Documentation

@kanunilabs/pivotgrid-react


@kanunilabs/pivotgrid-react / BasePivotGridProps

Interface: BasePivotGridProps<TRow>

Defined in: packages/react/src/components/BasePivotGrid.tsx:79

Props for the BasePivotGrid component. This is the enterprise-grade data orchestration layer for analytics.

Type Parameters

TRow

TRow

Properties

advancedExport?

optional advancedExport?: boolean

Defined in: packages/react/src/components/BasePivotGrid.tsx:184

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

Defined in: packages/react/src/components/BasePivotGrid.tsx:157

Configuration for chart synchronization.

Type Declaration

chartType?

optional chartType?: string


customContextMenuItems?

optional customContextMenuItems?: (field) => object[]

Defined in: packages/react/src/components/BasePivotGrid.tsx:153

Customize the context menu items for a specific field.

Parameters

field

PivotField<TRow>

Returns

object[]


data

data: TRow[]

Defined in: packages/react/src/components/BasePivotGrid.tsx:91

The raw tabular data array.


dictionary?

optional dictionary?: Partial<PivotDictionary>

Defined in: packages/react/src/components/BasePivotGrid.tsx:121

Dictionary for localized strings (i18n).


disabled?

optional disabled?: boolean

Defined in: packages/react/src/components/BasePivotGrid.tsx:173

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


fields?

optional fields?: PivotField<TRow>[]

Defined in: packages/react/src/components/BasePivotGrid.tsx:95

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


gridId?

optional gridId?: string

Defined in: packages/react/src/components/BasePivotGrid.tsx:81

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


initialFields?

optional initialFields?: PivotField<TRow>[]

Defined in: packages/react/src/components/BasePivotGrid.tsx:93

Initial field configuration (Uncontrolled mode).


keyboardNavigation?

optional keyboardNavigation?: object

Defined in: packages/react/src/components/BasePivotGrid.tsx:111

Configuration for keyboard navigation and accessibility.

enabled

enabled: boolean


layout?

optional layout?: PivotLayoutState

Defined in: packages/react/src/components/BasePivotGrid.tsx:97

Controlled layout configuration.


locale?

optional locale?: PivotLocale

Defined in: packages/react/src/components/BasePivotGrid.tsx:117

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


onAfterPivotCalculate?

optional onAfterPivotCalculate?: (result) => void

Defined in: packages/react/src/components/BasePivotGrid.tsx:141

Fired after the Pivot matrix compute cycle completes successfully.

Parameters

result

PivotEngineResult

Returns

void


onBeforePivotCalculate?

optional onBeforePivotCalculate?: () => void

Defined in: packages/react/src/components/BasePivotGrid.tsx:139

Fired immediately before the Pivot matrix compute cycle begins.

Returns

void


onCellClick?

optional onCellClick?: (e) => void

Defined in: packages/react/src/components/BasePivotGrid.tsx:131

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

Defined in: packages/react/src/components/BasePivotGrid.tsx:145

Fired after a cell is prepared to allow modifications.

Parameters

e

CellPreparedEvent<TRow>

Returns

void


onChartStateLoaded?

optional onChartStateLoaded?: (chartState) => void

Defined in: packages/react/src/components/BasePivotGrid.tsx:168

Callback to receive loaded chart state.

Parameters

chartState

PivotChartIntegrationOptions & object

Returns

void


onChartSync?

optional onChartSync?: (syncResult) => void

Defined in: packages/react/src/components/BasePivotGrid.tsx:159

Callback to receive chart integration payload.

Parameters

syncResult

ChartSyncResult

Returns

void


onError?

optional onError?: (error) => void

Defined in: packages/react/src/components/BasePivotGrid.tsx:170

Fired when a critical engine error occurs.

Parameters

error

Error

Returns

void


onExporting?

optional onExporting?: (e) => void

Defined in: packages/react/src/components/BasePivotGrid.tsx:143

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

Parameters

e

ExportingEvent

Returns

void


onFieldMove?

optional onFieldMove?: (e) => void | Promise<void>

Defined in: packages/react/src/components/BasePivotGrid.tsx:137

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

Defined in: packages/react/src/components/BasePivotGrid.tsx:149

Fired when fields configuration changes.

Parameters

fields

PivotField<TRow>[]

Returns

void


onImportData?

optional onImportData?: (data) => void

Defined in: packages/react/src/components/BasePivotGrid.tsx:103

Callback fired when data is imported via the UI.

Parameters

data

TRow[]

Returns

void


onLayoutChange?

optional onLayoutChange?: (layout) => void

Defined in: packages/react/src/components/BasePivotGrid.tsx:151

Fired when layout options change.

Parameters

layout

PivotLayoutState

Returns

void


onOpenFullScreenChart?

optional onOpenFullScreenChart?: () => void

Defined in: packages/react/src/components/BasePivotGrid.tsx:166

Callback fired when full screen chart icon is clicked.

Returns

void

Deprecated

This prop will be removed in a future major version. Use chartIntegrationOptions instead.


onRefresh?

optional onRefresh?: () => void

Defined in: packages/react/src/components/BasePivotGrid.tsx:101

Callback fired when the refresh button is clicked.

Returns

void


onToggleChart?

optional onToggleChart?: () => void

Defined in: packages/react/src/components/BasePivotGrid.tsx:161

Callback fired when chart toggle is clicked.

Returns

void


previewImport?

optional previewImport?: boolean

Defined in: packages/react/src/components/BasePivotGrid.tsx:105

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


registry?

optional registry?: PivotEngineRegistry

Defined in: packages/react/src/components/BasePivotGrid.tsx:115

The plugin registry containing custom functions and formatters.


renderCalculatedFieldModal?

optional renderCalculatedFieldModal?: (props) => ReactNode

Defined in: packages/react/src/components/BasePivotGrid.tsx:175

Slot for injecting Enterprise Calculated Field Modal

Parameters

props

any

Returns

ReactNode


renderNodeContextMenu?

optional renderNodeContextMenu?: (props) => ReactNode

Defined in: packages/react/src/components/BasePivotGrid.tsx:179

Slot for injecting Enterprise Node Context Menu

Parameters

props

any

Returns

ReactNode


renderPrefilterBuilder?

optional renderPrefilterBuilder?: (props) => ReactNode

Defined in: packages/react/src/components/BasePivotGrid.tsx:177

Slot for injecting Enterprise Prefilter Builder

Parameters

props

any

Returns

ReactNode


rtl?

optional rtl?: boolean

Defined in: packages/react/src/components/BasePivotGrid.tsx:119

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


stateStoring?

optional stateStoring?: PivotStateStoringConfig

Defined in: packages/react/src/components/BasePivotGrid.tsx:109

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


striped?

optional striped?: boolean

Defined in: packages/react/src/components/BasePivotGrid.tsx:123

Apply zebra striping to the data rows.


theme?

optional theme?: PivotTheme

Defined in: packages/react/src/components/BasePivotGrid.tsx:99

Custom theme configuration.


toolbar?

optional toolbar?: PivotToolbarConfig

Defined in: packages/react/src/components/BasePivotGrid.tsx:113

Configuration for the toolbar visibility and features.


upgradeUrl?

optional upgradeUrl?: string

Defined in: packages/react/src/components/BasePivotGrid.tsx:189

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


workerUrl?

optional workerUrl?: string | URL

Defined in: packages/react/src/components/BasePivotGrid.tsx:89

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.