@kanunilabs/pivotgrid / PivotGridVanillaConfig
Interface: PivotGridVanillaConfig<TRow>
The vanilla configuration surface.
Mirrors BasePivotGridProps minus the React mechanics: no render props, no
ref — the returned instance IS the ref. Core's generics are deliberately
re-bindable (that is why they exist); the vanilla layer binds templates to
string | Node and events to native MouseEvent in M2 when the painters
land.
Type Parameters
TRow
TRow = unknown
Properties
advancedExport?
optionaladvancedExport?:boolean
Enterprise slots (K3): the Community renderer opens the sockets, the
Enterprise package fills them. advancedExport also seeds the core
edition gate, exactly like the React advancedExport prop.
asyncTransactionWait?
optionalasyncTransactionWait?:number
How long applyTransactionAsync collects transactions before applying them together. Default 50 ms.
chartIntegrationOptions?
optionalchartIntegrationOptions?:VanillaChartIntegrationOptions
Chart bridge (the React usePivotChartSync contract, subscription-shaped).
className?
optionalclassName?:string
Extra class on the root element.
customContextMenuItems?
optionalcustomContextMenuItems?: (field) =>VanillaContextMenuItem[] |undefined
Extra items appended to a field's context menu (the React
customContextMenuItems prop). The React icon is a ReactNode; here it
is a factory returning a DOM node, so icon: () => icon('star', 14).
Parameters
field
PivotField<TRow>
Returns
VanillaContextMenuItem[] | undefined
dark?
optionaldark?:boolean
The built-in dark look (the DataGrid's dark palette). A palette decides its own mode and wins.
data
data:
TRow[]
defaultColumnWidths?
optionaldefaultColumnWidths?:PivotColumnWidthDefaults
Starting widths in pixels: { rowHeader, data } for every row-header
column and every data column. Defaults 150 and 95. A width the user drags
(or controller.setColumnWidths writes) still wins; see
PivotControllerState.columnWidths for its keys.
density?
optionaldensity?:PivotDensity
Row rhythm: 'compact' (24px rows, one size smaller type), 'normal'
(28px, the default) or 'comfortable' (36px). Change it later with
setDensity.
dictionary?
optionaldictionary?:Partial<PivotDictionary>
disabled?
optionaldisabled?:boolean
fields?
optionalfields?:PivotField<TRow,PivotCellTemplate,any>[]
Controlled fields — same semantics as the React fields prop.
gridId?
optionalgridId?:string
initialFields?
optionalinitialFields?:PivotField<TRow,PivotCellTemplate,any>[]
keyboardNavigation?
optionalkeyboardNavigation?:object
enabled
enabled:
boolean
layout?
optionallayout?:PivotLayoutState
Controlled layout — same semantics as the React layout prop.
locale?
optionallocale?:PivotLocale
maxColumns?
optionalmaxColumns?:number
Most column members drawn (default 1000); past it the grid says so and
totals still count all the data. 0 or Infinity turns the cap off.
onAddCalculatedField?
optionalonAddCalculatedField?: () =>void
The Enterprise sockets themselves, as plain callbacks — the vanilla shape
of React's renderCalculatedFieldModal / renderPrefilterBuilder render
props and its onToggleChart. Each one, when present, makes the footer
draw the matching button (the designer's, the prefilter's, the chart's)
and the field menu offer "Edit calculation" on calculated fields; absent,
nothing is drawn, so a Community grid stays exactly as it was.
@kanunilabs/pivotgrid-enterprise fills all four; an app may fill any.
Returns
void
onAfterPivotCalculate?
optionalonAfterPivotCalculate?: (result) =>void
Parameters
result
Returns
void
onBeforePivotCalculate?
optionalonBeforePivotCalculate?: () =>void
Returns
void
onCellClick?
optionalonCellClick?: (e) =>void
Parameters
e
Returns
void
onCellPrepared?
optionalonCellPrepared?: (e) =>void
Per-cell hook before a data/header cell hits the DOM — mutate cellConfig.
Parameters
e
Returns
void
onChartStateLoaded?
optionalonChartStateLoaded?: (chartState) =>void
Parameters
chartState
any
Returns
void
onChartSync?
optionalonChartSync?: (result) =>void
Parameters
result
Returns
void
onEditCalculatedField?
optionalonEditCalculatedField?: (field) =>void
Parameters
field
PivotField<TRow>
Returns
void
onError?
optionalonError?: (error) =>void
Parameters
error
Error
Returns
void
onExporting?
optionalonExporting?: (e) =>void
Parameters
e
ExportingEvent
Returns
void
onFieldMove?
optionalonFieldMove?: (e) =>void|Promise<void>
Parameters
e
FieldMoveEvent
Returns
void | Promise<void>
onFieldsChange?
optionalonFieldsChange?: (fields) =>void
Parameters
fields
PivotField<TRow, PivotCellTemplate, any>[]
Returns
void
onGlobalContextMenu?
optionalonGlobalContextMenu?: (x,y) =>void
Right-click on data cells / non-expandable row cells (viewport coords).
Parameters
x
number
y
number
Returns
void
onImportData?
optionalonImportData?: (data) =>void
Parameters
data
TRow[]
Returns
void
onLayoutChange?
optionalonLayoutChange?: (layout) =>void
Parameters
layout
Returns
void
onOpenPrefilter?
optionalonOpenPrefilter?: () =>void
Returns
void
onRefresh?
optionalonRefresh?: () =>void
Returns
void
onToggleChart?
optionalonToggleChart?: () =>void
Returns
void
palette?
optionalpalette?:string
A colour scheme by id — one of the 36 packaged ones ('nord',
'graphite'…, with @kanunilabs/pivotgrid/themes/<id>.css loaded after
styles.css) or your own from the Theme Builder. The same name as the
DataGrid's palette, so one value colours both. Wins over theme.id.
previewImport?
optionalpreviewImport?:boolean
registry?
optionalregistry?:PivotEngineRegistry
rowKey?
optionalrowKey?:PivotRowKeyResolver<TRow>
What identifies a row for applyTransaction — a field name or a function.
rtl?
optionalrtl?:boolean
search?
optionalsearch?:boolean
A search box in the footer: shows only the row members whose caption
contains the text, on top of the reader's own filters. Default false.
grid.setSearchText(text) works either way.
serverSource?
optionalserverSource?:PivotServerSource
Server-side pivot (Enterprise): the server aggregates; data is not read.
stateStoring?
optionalstateStoring?:PivotStateStoringConfig
striped?
optionalstriped?:boolean
theme?
optionaltheme?:PivotTheme
toolbar?
optionaltoolbar?:PivotToolbarConfig
upgradeUrl?
optionalupgradeUrl?:string
workerUrl?
optionalworkerUrl?:string|URL