Documentation

@kanunilabs/pivotgrid-react


@kanunilabs/pivotgrid-react / PivotControllerOptions

Interface: PivotControllerOptions<TRow>

Options for initializing a PivotController.

Extends

Type Parameters

TRow

TRow = any

Properties

asyncTransactionWait?

optional asyncTransactionWait?: number

How long applyTransactionAsync collects transactions before applying them together. Default 50 ms.


chartIntegrationOptions?

optional chartIntegrationOptions?: Record<string, any>


controlledFields?

optional controlledFields?: PivotField<TRow, PivotCellTemplate, any>[]


controlledLayout?

optional controlledLayout?: PivotLayoutState


data

data: TRow[]


enterpriseEdition?

optional enterpriseEdition?: boolean

Turns on the Enterprise edition for this controller.

BasePivotGrid sets it from the advancedExport prop, which is what EnterprisePivotGrid passes — so a normal React app never touches this. It exists because usePivotController, PivotGridBody and PivotFooter are all public: building your own shell is supported, and without a documented way in, that path would go from "exports a file" to "throws" with nothing to set.


gridId

gridId: string


initialFields

initialFields: PivotField<TRow, PivotCellTemplate, any>[]


locale?

optional locale?: string


maxColumns?

optional maxColumns?: number

Most column members shown (default 1000). A field with a value per row on columns makes tens of thousands of them and freezes the page; past the cap only the first ones are drawn, totals still count all the data, and the result says so in columnsTruncated. Exports are never cut: they keep every column. 0 or Infinity turns it off.


onAfterPivotCalculate?

optional onAfterPivotCalculate?: (result) => void

Parameters

result

PivotEngineResult

Returns

void

Inherited from

PivotControllerCallbacks.onAfterPivotCalculate


onBeforePivotCalculate?

optional onBeforePivotCalculate?: () => void

Returns

void

Inherited from

PivotControllerCallbacks.onBeforePivotCalculate


onChartStateLoaded?

optional onChartStateLoaded?: (chartState) => void

Parameters

chartState

any

Returns

void

Inherited from

PivotControllerCallbacks.onChartStateLoaded


onError?

optional onError?: (error) => void

Parameters

error

Error

Returns

void

Inherited from

PivotControllerCallbacks.onError


onExporting?

optional onExporting?: (e) => void

Parameters

e

ExportingEvent

Returns

void

Inherited from

PivotControllerCallbacks.onExporting


onFieldMove?

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

Parameters

e

FieldMoveEvent

Returns

void | Promise<void>

Inherited from

PivotControllerCallbacks.onFieldMove


onFieldsChange?

optional onFieldsChange?: (fields) => void

Parameters

fields

PivotField<TRow, PivotCellTemplate, any>[]

Returns

void

Inherited from

PivotControllerCallbacks.onFieldsChange


onImportData?

optional onImportData?: (data) => void

Parameters

data

TRow[]

Returns

void

Inherited from

PivotControllerCallbacks.onImportData


onLayoutChange?

optional onLayoutChange?: (layout) => void

Parameters

layout

PivotLayoutState

Returns

void

Inherited from

PivotControllerCallbacks.onLayoutChange


onRefresh?

optional onRefresh?: () => void

Returns

void

Inherited from

PivotControllerCallbacks.onRefresh


previewImport?

optional previewImport?: boolean

When true, file/URL/paste imports first open a preview + column-mapping step instead of applying immediately. Defaults to false (apply directly).


registry?

optional registry?: PivotEngineRegistry


rowKey?

optional rowKey?: PivotRowKeyResolver<TRow>

What identifies a row for applyTransaction: a field name, or a function returning a string or number — the DataGrid's rowKey. Without it rows are matched by object identity, so an update must pass the very object that is in data (mutated in place) and a remove cannot name a bare key.


serverSource?

optional serverSource?: PivotServerSource

Server-side pivot (A4 / G-PIV-01, Enterprise): the server aggregates and the grid lays the answer out. With it, data is not read; build one with pivotServerSource from an Enterprise package.


stateStoring?

optional stateStoring?: PivotStateStoringConfig

Where the grid's layout is persisted between sessions.

Omitted, it is localStorage keyed by gridId — the historical behaviour, kept so an upgrade does not lose anyone's saved layout.


workerUrl?

optional workerUrl?: string | URL