Documentation

@kanunilabs/pivotgrid-react


@kanunilabs/pivotgrid-react / PivotControllerState

Interface: PivotControllerState<TRow>

Full observable state of the pivot controller — consumed by UI frameworks.

Type Parameters

TRow

TRow = any

Properties

activeReportId

activeReportId: string | null


buildProgress?

optional buildProgress?: number

Monotonic engine build progress shown by UI loaders. 0..100, simulated when exact worker progress is unavailable.


columnWidths

columnWidths: Record<string, number>

Column widths in pixels that the user dragged or setColumnWidths wrote. Persisted with the layout (stateStoring). Keys:

  • row-<i> — row-header column i, counted from the outer row field (row-0); in the tree layout row-0 is the single row-header column. With dataFieldPosition: 'rows' the column of measure names comes last, at row-<number of row-header columns>.
  • leaf-<i> — data column i, counted left to right across the whole crosstab, totals included.

A column with no entry is painted at defaultColumnWidths (150 for row headers, 95 for data columns, when that is not set either). Row-header widths may be painted narrower than stored when the frozen block would leave the data less than its share of the viewport.


drag

drag: PivotDragIntentState


engineError

engineError: Error | null


engineResult

engineResult: PivotEngineResult | null


expandedColPaths

expandedColPaths: Set<string>


expandedPaths

expandedPaths: Set<string>


fields

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


gridId

gridId: string


importPreview

importPreview: PivotImportPreviewState | null

Pending import awaiting preview/column-mapping review (null when none).


importStatus

importStatus: PivotImportStatus


isBuilding

isBuilding: boolean


layout

layout: PivotLayoutState


reports

reports: PivotReport[]


searchText?

optional searchText?: string

The quick search (setSearchText): only the row members whose caption (as the header draws it — a month by its name) contains it are shown, with the members above them. Not saved with the layout or in reports; totals still count every row.


selectionStats

selectionStats: PivotSelectionStats | null