Documentation

@kanunilabs/pivotgrid-react


@kanunilabs/pivotgrid-react / PivotControllerOptions

Interface: PivotControllerOptions<TRow>

Options for initializing a PivotController.

Extends

Type Parameters

TRow

TRow = any

Properties

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


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


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