@kanunilabs/pivotgrid-react / PivotControllerOptions
Interface: PivotControllerOptions<TRow>
Options for initializing a PivotController.
Extends
PivotControllerCallbacks<TRow>
Type Parameters
TRow
TRow = any
Properties
asyncTransactionWait?
optionalasyncTransactionWait?:number
How long applyTransactionAsync collects transactions before applying them together. Default 50 ms.
chartIntegrationOptions?
optionalchartIntegrationOptions?:Record<string,any>
controlledFields?
optionalcontrolledFields?:PivotField<TRow,PivotCellTemplate,any>[]
controlledLayout?
optionalcontrolledLayout?:PivotLayoutState
data
data:
TRow[]
enterpriseEdition?
optionalenterpriseEdition?: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?
optionallocale?:string
maxColumns?
optionalmaxColumns?: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?
optionalonAfterPivotCalculate?: (result) =>void
Parameters
result
PivotEngineResult
Returns
void
Inherited from
PivotControllerCallbacks.onAfterPivotCalculate
onBeforePivotCalculate?
optionalonBeforePivotCalculate?: () =>void
Returns
void
Inherited from
PivotControllerCallbacks.onBeforePivotCalculate
onChartStateLoaded?
optionalonChartStateLoaded?: (chartState) =>void
Parameters
chartState
any
Returns
void
Inherited from
PivotControllerCallbacks.onChartStateLoaded
onError?
optionalonError?: (error) =>void
Parameters
error
Error
Returns
void
Inherited from
PivotControllerCallbacks.onError
onExporting?
optionalonExporting?: (e) =>void
Parameters
e
Returns
void
Inherited from
PivotControllerCallbacks.onExporting
onFieldMove?
optionalonFieldMove?: (e) =>void|Promise<void>
Parameters
e
Returns
void | Promise<void>
Inherited from
PivotControllerCallbacks.onFieldMove
onFieldsChange?
optionalonFieldsChange?: (fields) =>void
Parameters
fields
PivotField<TRow, PivotCellTemplate, any>[]
Returns
void
Inherited from
PivotControllerCallbacks.onFieldsChange
onImportData?
optionalonImportData?: (data) =>void
Parameters
data
TRow[]
Returns
void
Inherited from
PivotControllerCallbacks.onImportData
onLayoutChange?
optionalonLayoutChange?: (layout) =>void
Parameters
layout
Returns
void
Inherited from
PivotControllerCallbacks.onLayoutChange
onRefresh?
optionalonRefresh?: () =>void
Returns
void
Inherited from
PivotControllerCallbacks.onRefresh
previewImport?
optionalpreviewImport?:boolean
When true, file/URL/paste imports first open a preview + column-mapping step instead of applying immediately. Defaults to false (apply directly).
registry?
optionalregistry?:PivotEngineRegistry
rowKey?
optionalrowKey?: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?
optionalserverSource?: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?
optionalstateStoring?: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?
optionalworkerUrl?:string|URL