UNPKG

@1771technologies/lytenyte-pro

Version:

Blazingly fast headless React data grid with 100s of features.

16 lines (15 loc) 984 B
import type { PivotModel } from "../../use-client-data-source"; import type { Column } from "../../../types.js"; import { type ColumnPin, type RowLeaf } from "@1771technologies/lytenyte-shared"; import type { ControlledPivotState } from "./use-pivot-state"; import type { Grid } from "@1771technologies/lytenyte-core"; export interface PivotState { readonly columnState: { readonly ordering: string[]; readonly resizing: Record<string, number>; readonly pinning: Record<string, ColumnPin>; }; readonly columnGroupState: Record<string, boolean>; readonly rowGroupExpansions: Record<string, boolean | undefined>; } export declare function usePivotColumns<Spec extends Grid.GridSpec = Grid.GridSpec>(pivotMode: boolean, pivotControlled: ControlledPivotState, model: PivotModel<Spec> | undefined, leafs: RowLeaf<Spec["data"]>[], filtered: number[], processor: null | undefined | ((columns: Column<any>[]) => Column<any>[])): Column<Spec>[] | null;