Documentation

@kanunilabs/pivotgrid


@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?

optional advancedExport?: 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.


chartIntegrationOptions?

optional chartIntegrationOptions?: VanillaChartIntegrationOptions

Chart bridge (the React usePivotChartSync contract, subscription-shaped).


className?

optional className?: string

Extra class on the root element.


customContextMenuItems?

optional customContextMenuItems?: (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


data

data: TRow[]


dictionary?

optional dictionary?: Partial<PivotDictionary>


disabled?

optional disabled?: boolean


fields?

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

Controlled fields — same semantics as the React fields prop.


gridId?

optional gridId?: string


initialFields?

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


keyboardNavigation?

optional keyboardNavigation?: object

enabled

enabled: boolean


layout?

optional layout?: PivotLayoutState

Controlled layout — same semantics as the React layout prop.


locale?

optional locale?: PivotLocale


onAddCalculatedField?

optional onAddCalculatedField?: () => 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?

optional onAfterPivotCalculate?: (result) => void

Parameters

result

PivotEngineResult

Returns

void


onBeforePivotCalculate?

optional onBeforePivotCalculate?: () => void

Returns

void


onCellClick?

optional onCellClick?: (e) => void

Parameters

e

VanillaCellClickEvent

Returns

void


onCellPrepared?

optional onCellPrepared?: (e) => void

Per-cell hook before a data/header cell hits the DOM — mutate cellConfig.

Parameters

e

VanillaCellPreparedEvent

Returns

void


onChartStateLoaded?

optional onChartStateLoaded?: (chartState) => void

Parameters

chartState

any

Returns

void


onChartSync?

optional onChartSync?: (result) => void

Parameters

result

ChartSyncResult

Returns

void


onEditCalculatedField?

optional onEditCalculatedField?: (field) => void

Parameters

field

PivotField<TRow>

Returns

void


onError?

optional onError?: (error) => void

Parameters

error

Error

Returns

void


onExporting?

optional onExporting?: (e) => void

Parameters

e

ExportingEvent

Returns

void


onFieldMove?

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

Parameters

e

FieldMoveEvent

Returns

void | Promise<void>


onFieldsChange?

optional onFieldsChange?: (fields) => void

Parameters

fields

PivotField<TRow, PivotCellTemplate, any>[]

Returns

void


onGlobalContextMenu?

optional onGlobalContextMenu?: (x, y) => void

Right-click on data cells / non-expandable row cells (viewport coords).

Parameters

x

number

y

number

Returns

void


onImportData?

optional onImportData?: (data) => void

Parameters

data

TRow[]

Returns

void


onLayoutChange?

optional onLayoutChange?: (layout) => void

Parameters

layout

PivotLayoutState

Returns

void


onOpenPrefilter?

optional onOpenPrefilter?: () => void

Returns

void


onRefresh?

optional onRefresh?: () => void

Returns

void


onToggleChart?

optional onToggleChart?: () => void

Returns

void


previewImport?

optional previewImport?: boolean


registry?

optional registry?: PivotEngineRegistry


rtl?

optional rtl?: boolean


stateStoring?

optional stateStoring?: PivotStateStoringConfig


striped?

optional striped?: boolean


theme?

optional theme?: PivotTheme


toolbar?

optional toolbar?: PivotToolbarConfig


upgradeUrl?

optional upgradeUrl?: string


workerUrl?

optional workerUrl?: string | URL