View as Markdown

API reference: @salmonui/pivot-table

PivotTableStateinterface

import type { PivotTableState } from '@salmonui/pivot-table';
interface PivotTableState {
    readonly version: 1;
    readonly pivotModel: PivotModel;
    readonly layout?: 'compact' | 'tabular' | undefined;
    readonly columnWidths?: Readonly<Record<string, number>> | undefined;
}

Serializable state (api.getState()).

PivotTableState members (4)
NameSignatureDescription
versionreadonly version: 1;

Schema version; restoreState() rejects newer versions.

pivotModelreadonly pivotModel: PivotModel;
layoutoptionalreadonly layout?: 'compact' | 'tabular' | undefined;
columnWidthsoptionalreadonly columnWidths?: Readonly<Record<string, number>> | undefined;

User column widths by column key.