Adapter API (React / Vue / Vanilla)
Every prop and mount option of the framework adapters — the React <TensorGrid> / <TensorPivot> /
<TensorVirtualGrid> components, their Vue equivalents, and the zero-dependency vanilla
mountTensorGrid / mountTensorPivot / mountVirtualGrid functions (plus their returned control
handles). The three adapters share the same option surface over @tensorgrid/core.
| Name | Type | Default | Description |
|---|---|---|---|
TensorGrid.footerLabelAggregation | string | 'Total' | Label for the footer row's group cell. Only used when showFooter. |
TensorGrid.grandTotalAggregation | boolean | false | Prepend a grand-total row. |
TensorGrid.measuresAggregation | Record<string, string> | — | { measure: agg } (built-in string aggregations). Optional when autoGroup infers them. |
TensorGrid.showFooterAggregation | boolean | false | Render a footer (grand-total) row: each base measure aggregated over the WHOLE frame via core gridGrandTotal (engine semantics — not a client-side sum of pre-aggregated leaves). A window/derived column shows the null text. |
TensorGrid.topNAggregation | { by: string; n: number; others?: boolean; othersLabel?: string } | — | Keep only the top-n children (by measure by, descending) at EVERY level, via core topNChildren. With others, the rest roll into one 'Others' node that SUMS the measures (othersLabel default 'Others'). Runs after filtering, before sort. Avoid combining with grandTotal. |
TensorPivot.measures *Aggregation | Record<string, string> | — | { measure: agg } (built-in string aggregations). |
TensorVirtualGrid.footerLabelAggregation | string | 'Total' | Label for the footer row's label cell. Only used when showFooter. |
TensorVirtualGrid.grandTotalAggregation | boolean | false | Prepend a grand-total row. |
TensorVirtualGrid.measures *Aggregation | Record<string, string> | — | { measure: agg } (built-in string aggregations). |
TensorVirtualGrid.showFooterAggregation | boolean | — | Render a PINNED grand-total footer row BELOW the scroller (always visible while the list scrolls) — each measure over the WHOLE frame via core gridGrandTotal. |
GridMountOptions.cellRenderersCell-viz | Record<string, (value: unknown, node: TreeNode) => string | null> | — | Custom cell renderer per measure column. The returned HTML is inserted VERBATIM (NOT escaped — an allow_html-style escape hatch). Return null to fall back to the formatted value. Highest cell-content precedence. Use the exported htmlEscape on interpolated data. (Vanilla returns an HTML string, unlike React/Vue nodes.) |
TensorGrid.cellRenderersCell-viz | Record<string, (value: unknown, node: TreeNode) => ReactNode> | — | Custom cell renderer per measure column (by accessorKey). Build any cell content (link, badge, button, chip) as React elements (XSS-safe; no innerHTML). Return null/undefined to fall back to the formatted value. Highest cell-content precedence. |
TensorGrid.colorScalesCell-viz | Record<string, ColorScaleSpec> | — | Continuous color-scale (heatmap) per measure column (by accessorKey): { min, max, mid?, domainMin?, domainMax? }. Each cell's background is interpolated from its raw value's position in that column's range over the whole tree (grand-total row excluded). An explicit cellStyles background wins. |
TensorGrid.dataBarsCell-viz | Record<string, DataBarSpec> | — | In-cell data bar per measure column (by accessorKey): { color, domainMin?, domainMax? }. Left-anchored gradient bar whose length is the value's fraction of [0, column max]. Background precedence: cellStyles background > dataBars > colorScales. |
TensorGrid.iconSetsCell-viz | Record<string, IconSetSpec> | — | 3-level icon set per measure column (by accessorKey): { set?, thresholds?, colors?, icons?, reverse? }. Colored traffic-light / trend-arrow icon for its level in the column domain (thirds by default). An explicit cellStyles icon wins. |
TensorGrid.sparklinesCell-viz | Record<string, SparklineOptions> | — | Inline sparkline per measure column (by accessorKey). That column's cells render a dependency-free SVG line/bar chart from their ARRAY value (a per-node series) instead of a number. |
TensorPivot.cellRenderersCell-viz | Record<string, (value: unknown, node: TreeNode) => ReactNode> | — | Host cell renderer keyed by MEASURE NAME. Every pivoted column cell of that measure replaces its formatted value with the returned node (XSS-safe); null/undefined falls back. Highest cell-content precedence; a conditional icon still prepends. |
TensorPivot.colorScalesCell-viz | Record<string, ColorScaleSpec> | — | Continuous color-scale keyed by MEASURE NAME: every pivoted column cell of that measure shares ONE domain across the cross-tab. The grand-total COLUMN cells are EXCLUDED from the domain but still coloured, clamped. A cellStyles background wins. |
TensorPivot.dataBarsCell-viz | Record<string, DataBarSpec> | — | In-cell data bar keyed by MEASURE NAME (same per-measure domain + grand-total-column exclusion as colorScales). Background precedence: cellStyles background > dataBars > colorScales. |
TensorPivot.iconSetsCell-viz | Record<string, IconSetSpec> | — | 3-level icon set keyed by MEASURE name. Every column cell of that measure gets a colored icon for its level in the shared per-measure domain. A cellStyles icon wins. |
TensorVirtualGrid.cellRenderersCell-viz | Record<string, (value: unknown, node: TreeNode) => ReactNode> | — | Host cell renderer per measure column (by accessorKey). Returns a ReactNode that replaces the formatted value; XSS-safe. Highest cell-content precedence. |
TensorVirtualGrid.colorScalesCell-viz | Record<string, ColorScaleSpec> | — | Continuous color-scale (heatmap) per measure column (by accessorKey), over the whole display tree (grand-total excluded). A cellStyles background wins. |
TensorVirtualGrid.dataBarsCell-viz | Record<string, DataBarSpec> | — | In-cell data bar per measure column (by accessorKey). Length is the value's fraction of [0, column max]. Background precedence: cellStyles background > dataBars > colorScales. |
TensorVirtualGrid.iconSetsCell-viz | Record<string, IconSetSpec> | — | 3-level icon set per measure column (by accessorKey). A cellStyles icon wins. |
TensorVirtualGrid.sparklinesCell-viz | Record<string, SparklineOptions> | — | Inline sparkline per measure column (by accessorKey). An array-valued cell renders a mini SVG line/bar chart instead of a number. |
GridMountOptionsChrome | interface { data; rows?; measures?; autoGroup?; formats?; headers?; grandTotal?; having?; showFooter?; footerLabel?; groupHeader?; locale?; masterDetail?; detailLimit?; editable?; onCellEdit?; validationRules?; onEditRejected?; cellStyles?; colorScales?; dataBars?; iconSets?; sparklines?; cellRenderers?; topN?; pinFirstColumn?; windowColumns?; enableClipboard?; onCopy?; showStatusBar?; enableKeyboardNav?; showSearch?; searchPlaceholder?; showExportButton?; onExport?; exportLabel?; exportMode?; exportFormatted?; showSelectionToolbar?; selectAllLabel?; clearSelectionLabel?; showDensityToggle?; density?; onDensityChange?; noRowsMessage?; showColumnToggle?; hiddenColumns?; onColumnVisibilityChange?; columnOrder?; enableColumnReorder?; onColumnReorder?; resizableColumns?; columnWidths?; onColumnResize? } | — | Options object for mountTensorGrid. data required; rows/measures optional when autoGroup. Semantics of each option match the corresponding React TensorGrid prop; groupHeader (default first dim's header override or 'Group') and cellRenderers return an HTML string (verbatim, trusted — use htmlEscape) rather than a ReactNode. showStatusBar/showColumnToggle/columnOrder/enableColumnReorder/resizableColumns all supported. |
mountTensorGrid *Chrome | (el: HTMLElement, options: GridMountOptions) => MountHandle<GridMountOptions> | — | Zero-dependency imperative mount of a roll-up tree table (core renderGridHtml) into el, with delegated click-to-expand. Returns the control handle. Every option mirrors the React TensorGrid props but as a plain options object (mount-time, not reactive props); selection is pull-model (read via handle.getSelected(), no onSelectionChange). |
TensorGrid *Chrome | (props: TensorGridProps) => ReactElement | — | React roll-up tree grid component over @tensorgrid/core. Props are raw data + a grouping/measure spec; it builds the tree (treePayload), column defs (makeColumnDefs) and formatted cells (formatValue) entirely client-side and renders a TanStack-free <table> with click-to-expand. createElement-based (no JSX); React 18 is a peer dependency. |
TensorGrid.densityChrome | 'comfortable' | 'standard' | 'compact' | 'standard' | Initial (and, without the toggle, fixed) row density. Applies the tg-density-<level> class when set even if the toggle button is not shown. |
TensorGrid.enableKeyboardNavChrome | boolean | — | Opt-in keyboard row navigation: roving-tabindex arrow Up/Down move an active row (.tg-active, focused), Home/End jump to first/last, Space toggles selection, Shift+Arrow extends the selection range (core selectionRange), Enter / ArrowRight / ArrowLeft expand/collapse a group row. |
TensorGrid.noRowsMessageChrome | string | — | When the grid has ZERO visible rows (every row filtered out), render this text in a single full-width .tg-no-rows placeholder row instead of an empty body. Omitted = empty body. |
TensorGrid.onDensityChangeChrome | (level: 'comfortable' | 'standard' | 'compact') => void | — | Fired with the new level after each density change (toggle click). |
TensorGrid.pinFirstColumnChrome | boolean | — | Freeze the group (label) column via position: sticky so it stays visible on horizontal scroll. The adapter owns positioning + a tg-pinned class; the HOST must provide an overflow-x:auto wrapper and an opaque background for the pinned cells. |
TensorGrid.searchPlaceholderChrome | string | 'Search' | Placeholder text for the built-in search input. |
TensorGrid.showDensityToggleChrome | boolean | — | Render an opt-in .tg-density-toggle button that cycles the row density comfortable -> standard -> compact, applied as a tg-density-<level> class on the .tg-grid table. |
TensorGrid.showExpandControlsChrome | boolean | false | Render an opt-in toolbar above the grid with Expand all / Collapse all / Level N buttons that set the expanded-state via core expandToDepth. Host styles .tg-expand-controls (.tg-grid-wrap wraps the toolbar + table). |
TensorGrid.showSearchChrome | boolean | — | Render an opt-in built-in .tg-search input above the grid that filters rows via core quickFilterPredicate (case-insensitive substring over the row dimensions). ANDs with the quickFilter prop. |
TensorGrid.showStatusBarChrome | boolean | — | Render an opt-in .tg-status-bar footer with the selection size + per-measure count/sum/avg/min/max (core summarizeRows over selected SOURCE rows). Only appears when a selection exists. |
TensorPivot.noRowsMessageChrome | string | — | When the cross-tab has ZERO body rows, render this text in a full-width .tg-no-rows placeholder row instead of an empty body. |
TensorPivot.pinFirstColumnChrome | boolean | false | Freeze the group (row-hierarchy) column via position: sticky (.tg-pinned) so it stays visible while a wide cross-tab scrolls horizontally. Host wraps in overflow-x:auto + gives .tg-pinned an opaque background. |
TensorPivot.searchPlaceholderChrome | string | 'Search' | Placeholder text for the built-in search input. |
TensorPivot.showSearchChrome | boolean | — | Render an opt-in built-in .tg-search input above the cross-tab that filters the ROW hierarchy via the core quick-filter (over ALL row dims). ANDs with the root filter. |
TensorVirtualGrid.noRowsMessageChrome | string | — | When the filtered view is EMPTY, render this text in a single full-width .tg-no-rows placeholder instead of a blank scroller. |
TensorVirtualGrid.searchPlaceholderChrome | string | 'Search' | Placeholder text for the built-in search input. |
TensorVirtualGrid.showSearchChrome | boolean | — | Render an opt-in built-in .tg-search input above the scroller (core quick-filter over the row dims). ANDs with the quickFilter prop. |
Vue TensorGridChrome | defineComponent; props: TensorGridProps | — | Vue 3 render-function adapter (h, no SFC). Prop interface is IDENTICAL to React TensorGridProps (same names/types/defaults for data, apiRef, rows, measures, autoGroup, formats, headers, grandTotal, having, locale, quickFilter, enableColumnFilters, rootFilter, onSelectionChange, enableClipboard, onCopy, showExpandControls, showStatusBar, enableKeyboardNav, showSearch, searchPlaceholder, showExportButton, onExport, exportLabel, exportMode, exportFormatted, showSelectionToolbar, selectAllLabel, clearSelectionLabel, showDensityToggle, density, onDensityChange, noRowsMessage, showColumnToggle, hiddenColumns, onColumnVisibilityChange, columnOrder, enableColumnReorder, onColumnReorder, resizableColumns, columnWidths, onColumnResize, masterDetail, detailLimit, editable, onCellEdit, validationRules, onEditRejected, cellStyles, topN, pinFirstColumn, windowColumns, showFooter, footerLabel, colorScales, dataBars, iconSets, sparklines, cellRenderers). Vue delta: cellRenderers return VNodeChild (not ReactNode); apiRef is a Vue ref(null). Vue 3 is a peer dependency. |
TensorGrid.enableClipboardClipboard | boolean | — | With a non-empty selection, Ctrl/Cmd-C copies the selected SOURCE rows to the system clipboard as CSV (best-effort navigator.clipboard.writeText). Composes core toCsv(rowsForSelection(...)). |
TensorGrid.onCopyClipboard | (csv: string) => void | — | Also (or instead) receive the CSV of the selected SOURCE rows on each Ctrl/Cmd-C copy. Providing this enables the copy gesture even when enableClipboard is unset. |
MountHandle.setColumnOrderColumn | setColumnOrder?(order: string[] | null): void | — | Set the MEASURE-column display order (accessorKeys; unknown keys ignored, unlisted measures keep their relative order after). null/[] restores natural order. Reorders live + fires onColumnReorder. GRID only (no-op on the pivot). |
TensorGrid.columnOrderColumn | string[] | — | Initial MEASURE-column display order (accessorKeys). Keys listed render first in this order; measures not listed keep their original relative position after them (via core reorderMeasureCols). |
TensorGrid.columnWidthsColumn | Record<string, number> | — | Initial per-column widths in px, keyed by measure accessorKey or '__group__' for the group column. |
TensorGrid.enableColumnReorderColumn | boolean | — | Enable drag-to-reorder of MEASURE column headers (HTML5 drag; drop swaps the order). Fires onColumnReorder. The group/dimension header is fixed. |
TensorGrid.hiddenColumnsColumn | string[] | none (all shown) | Measure accessorKeys hidden initially (checkbox unchecked). |
TensorGrid.onColumnReorderColumn | (order: string[]) => void | — | Fired with the new measure-column order after a drag-reorder (or apiRef.setColumnOrder). |
TensorGrid.onColumnResizeColumn | (widths: Record<string, number>) => void | — | Fired after each resize drag with the current width map — keyed by measure accessorKey, plus '__group__' for the group column (e.g. { __group__: 150, revenue: 80 }). |
TensorGrid.onColumnVisibilityChangeColumn | (hidden: string[]) => void | — | Fired with the accessorKeys currently hidden after each column-visibility toggle. |
TensorGrid.resizableColumnsColumn | boolean | — | Make columns resizable: each measure header AND the group/dimension header gets a drag handle that sets its width. For strict widths incl. shrinking below content, give the table table-layout: fixed; otherwise a width acts as a minimum. |
TensorGrid.showColumnToggleColumn | boolean | — | Render an opt-in .tg-column-toggle control — one checkbox per MEASURE column that shows/hides that column client-side (the group/dimension column is always shown). No backend round-trip. |
TensorGrid.cellStylesConditional-format | Record<string, CellStyleRule[]> | — | Conditional formatting: per measure-column (by accessorKey) rules applied to each cell's RAW value via core evalCellStyle (first-match-wins; same operator vocabulary as filter conditions). The winning rule's style (camelCase CSS) is merged and its className appended. Example: { revenue: [{ op: '<', value: 0, style: { color: 'red' } }] }. |
TensorPivot.cellStylesConditional-format | Record<string, CellStyleRule[]> | — | Conditional formatting keyed by MEASURE NAME (not the raw <colPath>::<measure> accessorKey): rules apply to EVERY column cell of that measure (a heatmap across pivoted columns) via core evalCellStyle. |
TensorVirtualGrid.cellStylesConditional-format | Record<string, CellStyleRule[]> | — | Conditional formatting per measure-column (by accessorKey) via core evalCellStyle (first-match-wins). |
MountHandle.collapseAllCore-api-handle | collapseAll(): void | — | Collapse every node to the roots. |
MountHandle.destroyCore-api-handle | destroy(): void | — | Remove listeners and clear the container. |
MountHandle.expandAllCore-api-handle | expandAll(): void | — | Expand every expandable node. |
MountHandle.expandToLevelCore-api-handle | expandToLevel(depth: number): void | — | Expand every node down to `depth` levels via core expandToDepth (depth<=0 collapses to roots; a depth past the deepest fully expands). Backs 'expand to level N' controls. |
MountHandle.getExpandedCore-api-handle | getExpanded(): Record<string, boolean> | — | Read the current expanded-state map. |
MountHandle.setExpandedCore-api-handle | setExpanded(expanded: Record<string, boolean>): void | — | Replace the expanded-state map. |
MountHandle.updateCore-api-handle | update(options: Partial<O>): void | — | Merge new options and rebuild (expansion + sort state kept — node ids are stable). |
TensorGrid.autoGroupData | boolean | false | 'Just pass data': when set and rows is omitted/empty, infer the dimension hierarchy + numeric measures from the flat data via core inferSchema (non-numeric cols -> dims by ascending cardinality; numeric cols -> summed measures). Explicit rows / measures always win. |
TensorGrid.data *Data | Record<string, unknown>[] | — | Raw source rows. |
TensorGrid.rowsData | string[] | — | Row dimension columns (the roll-up hierarchy), root -> leaf. Optional when autoGroup infers them. |
TensorPivot.data *Data | Record<string, unknown>[] | — | Raw source rows. |
TensorPivot.rows *Data | string[] | — | Row dimension columns (the row hierarchy), root -> leaf. |
TensorVirtualGrid.data *Data | Record<string, unknown>[] | — | Raw source rows. |
TensorVirtualGrid.rows *Data | string[] | — | Row dimension columns (the roll-up hierarchy), root -> leaf. |
TensorGrid.detailLimitEditing | number | 20 | Max detail rows shown per leaf. |
TensorGrid.editableEditing | boolean | — | With masterDetail: detail SOURCE cells become click-to-edit (input swap; Enter/blur commits, Escape cancels). A commit runs core applyEdit over an internal data overlay and rebuilds the tree. The overlay resets when data changes identity. |
TensorGrid.masterDetailEditing | boolean | — | Master-detail: clicking a LEAF row toggles an inline table of its underlying SOURCE rows (core drillThrough over data). |
TensorGrid.onCellEditEditing | (edit: CellEdit) => void | — | Fired after a committed edit with the applied CellEdit. |
TensorGrid.onEditRejectedEditing | (detail: EditRejectedDetail) => void | — | Fired when an edit is REJECTED (a ValidationRule, the stale guard, or the dtype guard); the edit is dropped. EditRejectedDetail = { column, rowIndex, code, message }. |
TensorGrid.validationRulesEditing | Record<string, ValidationRule[]> | — | Per-column edit-validation rules passed to core applyEdit; a rejected edit is dropped (source value restored) and reported via onEditRejected. |
MountHandle.aggregatedToCsvExport | aggregatedToCsv(csvOpts?: CsvExportOptions): string | — | CSV of the AGGREGATED roll-up as shown — filter / sort / top-N / window columns applied — via core treeToCsv (one column per dimension level + one per measure). { format: true } emits the DISPLAYED (formatted) values. Tree-grid oriented (the pivot uses its own toCsv). |
MountHandle.exportCsvExport | exportCsv(): string | — | CSV of the selected SOURCE rows if a selection exists, else ALL source rows (core rowsForSelection / toCsv). Backs the opt-in Export button. |
MountHandle.selectionToCsvExport | selectionToCsv(csvOpts?: ToCsvOptions): string | — | CSV of the SOURCE rows under the selection (core rowsForSelection + toCsv: topmost paths deduped — an ancestor covers its descendants — order-preserving union). |
PivotMountHandle.toCsvExport | toCsv(csvOpts?: PivotCsvOptions): string | — | The current cross-tab as CSV: one column per row dimension + one per pivoted measure leaf (named by its flattened group path). Raw numerics; all tree levels (subtotals included). PivotMountHandle extends MountHandle<PivotMountOptions>. |
TensorGrid.exportFormattedExport | boolean | false | With exportMode='aggregated', emit the DISPLAYED (formatted) measure values (each column's formatStr) instead of raw numerics. |
TensorGrid.exportLabelExport | string | 'Export CSV' | Label for the Export button. |
TensorGrid.exportModeExport | 'source' | 'aggregated' | 'source' | What the Export button emits: 'source' = the raw underlying rows (selected, or all) via toCsv(rowsForSelection(...)); 'aggregated' = the roll-up AS SHOWN (dimension columns + measures, every level) via core treeToCsv over the current display tree. |
TensorGrid.onExportExport | (csv: string) => void | — | Receives the CSV when the Export button is clicked (selected source rows, or all rows if none selected). |
TensorGrid.showExportButtonExport | boolean | — | Render an opt-in Export button above the grid. Clicking fires onExport with the CSV of the SELECTED source rows (core rowsForSelection + toCsv) if a selection exists, else ALL source rows. Callback-only. |
TensorPivot.exportFormattedExport | boolean | false | Emit the DISPLAYED (formatted) measure values (each leaf's formatStr) in the export instead of raw numerics. |
TensorPivot.exportLabelExport | string | 'Export CSV' | Label for the Export button. |
TensorPivot.onExportExport | (csv: string) => void | — | Receives the cross-tab CSV when the Export button is clicked. |
TensorPivot.showExportButtonExport | boolean | — | Render an opt-in Export button above the cross-tab. Clicking fires onExport with the CSV of the CURRENT view (core pivotToCsv over the displayed row tree + column defs). Callback-only. |
TensorVirtualGrid.exportFormattedExport | boolean | false | Emit FORMATTED measure values in the export instead of raw numerics (passes { format: true } to treeToCsv). |
TensorVirtualGrid.exportLabelExport | string | 'Export CSV' | Label for the Export button. |
TensorVirtualGrid.onExportExport | (csv: string) => void | — | Receives the aggregated-tree CSV when the Export button is clicked. |
TensorVirtualGrid.showExportButtonExport | boolean | — | Render an opt-in Export button above the scroller. Clicking fires onExport with the CSV of the AGGREGATED roll-up AS SHOWN (filter + sort applied) via core treeToCsv. Callback-only. |
MountHandle.setFilterFiltering | setFilter(predicate: NodePredicate | null): void | — | Prune by a node predicate via core filterTree (ancestor paths kept); null clears. Composes with sort: filter first, then sort. |
TensorGrid.enableColumnFiltersFiltering | boolean | false | Show a per-column filter row under the header: a control on the root dimension + a min/max range filter per measure column, applied client-side over the tree via core columnFilterPredicate (frontend does no math). |
TensorGrid.havingFiltering | string | — | Post-aggregation group filter: a safe formula-DSL predicate over each node's MEASURES ('revenue > 1000' / 'revenue > cost * 1.5'); groups that fail are pruned (ancestor paths to a survivor kept), via core applyHaving. Blank/undefined = no filter. |
TensorGrid.quickFilterFiltering | string | — | Case-insensitive substring filter over the row dimensions (ancestor paths kept; a matching group keeps its breakdown). Blank/undefined = no filter. |
TensorGrid.rootFilterFiltering | RootFilterKind ('text' | 'select' | 'set' | 'conditions' | 'date') | 'text' | The root-dimension control when enableColumnFilters: a substring 'text' box, a single-value 'select' dropdown, a multi-value 'set' checkbox list, or a 'conditions' operator builder. select/set list the root dimension's distinct source values (via core facetCounts). 'date' renders a from/to date-picker pair. |
TensorPivot.enableColumnFiltersFiltering | boolean | false | Show a filter row under the header: a single control on the root ROW dimension, applied client-side over the row hierarchy via core columnFilterPredicate. Prunes which row groups appear. The pivoted COLUMN groups are the cross-tab's shape and are not filtered here. |
TensorPivot.enableColumnGroupFilterFiltering | boolean | false | Show a column-group picker in the corner header cell: a checkbox list of the outer column-dimension values (via core pivotColumnGroups). Unchecking a group hides that column group — a client-side DISPLAY prune (core filterPivotColumnDefs before layout). Does not re-aggregate; the grand-total column is always kept. |
TensorPivot.rootFilterFiltering | RootFilterKind | 'text' | The root-row-dimension control variant when enableColumnFilters. |
TensorVirtualGrid.enableColumnFiltersFiltering | boolean | false | Show a filter BAR above the scroller: a single root-dimension control, applied client-side over the tree via core columnFilterPredicate. Headerless windowed rows have no measure columns to align a range under, so this is the root control only. |
TensorVirtualGrid.quickFilterFiltering | string | — | Case-insensitive substring filter over the row dimensions. |
TensorVirtualGrid.rootFilterFiltering | RootFilterKind | 'text' | The root-dimension control variant when enableColumnFilters. |
GridMountOptions.groupHeaderFormatting | string | first dim's header override, or 'Group' | Header for the auto-group column (vanilla grid mount specific; React uses headers[firstDim]). |
TensorGrid.formatsFormatting | Record<string, string> | — | Optional per-column formatStr overrides. |
TensorGrid.headersFormatting | Record<string, string> | — | Optional per-column header overrides. |
TensorGrid.localeFormatting | string | 'en-US' | BCP-47 locale for number/date formatting. |
TensorPivot.formatsFormatting | Record<string, string> | — | Optional per-measure formatStr overrides. |
TensorPivot.groupHeaderFormatting | string | 'Group' | Header for the auto-group (row hierarchy) column. |
TensorPivot.localeFormatting | string | 'en-US' | BCP-47 locale for formatting. |
TensorVirtualGrid.formatsFormatting | Record<string, string> | — | Optional per-column formatStr overrides. |
TensorVirtualGrid.headersFormatting | Record<string, string> | — | Optional per-column header overrides. |
TensorVirtualGrid.localeFormatting | string | 'en-US' | BCP-47 locale for formatting. |
mountTensorPivot *Pivot | (el: HTMLElement, options: PivotMountOptions) => PivotMountHandle | — | Zero-dependency imperative mount of a cross-tab (core pivotGrid + renderPivotHtml) into el. Sorting is programmatic (handle.setSort by a cell accessor key). Returns PivotMountHandle (MountHandle + toCsv). |
PivotMountOptionsPivot | interface { data; rows; cols; measures; formats?; colSubtotals?; grandTotal?; rowGrandTotal?; pinFirstColumn?; groupHeader?; locale?; keptColumnGroups?; cellStyles?; colorScales?; dataBars?; iconSets?; cellRenderers?; showSearch?; searchPlaceholder?; noRowsMessage?; showExportButton?; onExport?; exportLabel?; exportFormatted? } | — | Options object for mountTensorPivot. colSubtotals/grandTotal default true, rowGrandTotal defaults false. cellStyles/colorScales/dataBars/iconSets/cellRenderers keyed by MEASURE NAME. |
PivotMountOptions.keptColumnGroupsPivot | string[] | undefined/[] = show all | Column-group display prune: keep only these outer column-dimension group headers (e.g. ['2024']). The imperative parallel to setFilter for rows — drive via handle.update({ keptColumnGroups }). A hidden column's data still counts toward the grand-total column (a display prune via core filterPivotColumnDefs, not re-aggregation). Enumerate headers with core pivotColumnGroups(pivotGrid(...).column_defs). |
TensorPivot *Pivot | (props: TensorPivotProps) => ReactElement | — | React symmetric cross-tab component over core pivotGrid. Props are raw data + row/column dimensions + measures; computes the whole pivot client-side, lays out nested column groups via layoutPivotHeader, and renders a multi-row header + click-to-expand row hierarchy. |
TensorPivot.cols *Pivot | string[] | — | Column dimension columns (pivoted into nested groups), outer -> inner. |
TensorPivot.colSubtotalsPivot | boolean | true | Emit a subtotal column at each non-leaf column level. |
TensorPivot.grandTotalPivot | boolean | true | Emit a grand-total column group. |
TensorPivot.rowGrandTotalPivot | boolean | false | Prepend a synthetic top 'Total' ROW aggregating across all row groups (the symmetric partner of the grand-total column). |
Vue TensorPivotPivot | defineComponent; props: TensorPivotProps | — | Vue 3 cross-tab adapter over core pivotGrid. Prop interface identical to React TensorPivotProps (data, apiRef, rows, cols, measures, formats, colSubtotals=true, grandTotal=true, rowGrandTotal=false, pinFirstColumn=false, groupHeader='Group', locale='en-US', enableColumnFilters=false, rootFilter='text', showSearch, searchPlaceholder, enableColumnGroupFilter=false, cellStyles [by measure name], colorScales, dataBars, iconSets, cellRenderers, noRowsMessage, showExportButton, onExport, exportLabel, exportFormatted). Vue delta: cellRenderers return VNodeChild. |
MountHandle.applyStateSaved-views | applyState(state: GridViewState): void | — | Restore a (partial) view state produced by getState — only the axes present in state change; the rest are untouched. Re-renders once. |
MountHandle.getStateSaved-views | getState(): GridViewState | — | Capture the current serializable VIEW state (expansion / sort / search / hidden columns / density / widths / selection) for a saved view or preset. Round-trips through applyState. |
TensorGrid.apiRefSaved-views | { current: TensorGridApi | null } | — | Optional imperative API handle: pass a mutable ref object ({ current: null }) and the component fills .current with { getState, applyState, setColumnOrder } for saved views / presets. Read-only from the host's side; the host persists the captured state and calls applyState to restore it. |
TensorGridApiSaved-views | { getState(): GridViewState; applyState(state: GridViewState): void; setColumnOrder(order: string[] | null): void } | — | Imperative saved-view API written to props.apiRef.current: getState captures the serializable VIEW state (expansion / sort / search / hidden columns / density / widths / selection / columnOrder); applyState restores a partial preset (only the axes present in state change); setColumnOrder sets the measure-column display order (null/[] restores natural order). |
TensorPivot.apiRefSaved-views | { current: TensorPivotApi | null } | — | Optional imperative API handle filled with { getState, applyState } for saved views / presets (expansion / sort / column-group prune). |
TensorPivotApiSaved-views | { getState(): GridViewState; applyState(state: GridViewState): void } | — | Imperative saved-view API for the pivot (props.apiRef.current): capture / restore the serializable view state (expansion / sort / the kept column-group prune). No column reorder — the pivot's column order is fixed by the cross-tab. |
TensorVirtualGrid.apiRefSaved-views | { current: TensorVirtualGridApi | null } | — | Opt-in imperative API: a stable { getState, applyState } written to apiRef.current for saved views / presets (capture & restore the expand state the host cannot otherwise reach). |
TensorVirtualGridApiSaved-views | { getState(): GridViewState; applyState(state: GridViewState): void } | — | Imperative saved-view API on props.apiRef.current. The virtual grid owns only the EXPAND axis internally, so getState captures { expanded } and applyState restores it — a partial GridViewState cross-compatible with a full grid's preset. |
MountHandle.clearSelectionSelection | clearSelection(): void | — | Empty the selection. |
MountHandle.getSelectedSelection | getSelected(): string[] | — | Selected node ids (ctrl/meta-click toggles a row; plain click keeps expand behavior). |
TensorGrid.clearSelectionLabelSelection | string | 'Clear' | Label for the 'Clear' button. |
TensorGrid.onSelectionChangeSelection | (ids: string[]) => void | — | Fired after every ctrl/meta-click selection toggle with the selected node ids. Compose export with core helpers: toCsv(rowsForSelection(data, rows, ids.map(id => ({id})))). |
TensorGrid.selectAllLabelSelection | string | 'Select all' | Label for the 'Select all' button. |
TensorGrid.showSelectionToolbarSelection | boolean | — | Render an opt-in .tg-selection-toolbar above the grid with 'Select all' / 'Clear' buttons. Select all selects every currently-visible row; Clear empties the selection. Both fire onSelectionChange. |
MountHandle.setSortSorting | setSort(by: string | null, desc?: boolean): void | — | Sort siblings by a single column key; null restores engine order (equivalent to setSortKeys([{ by, desc }])). |
MountHandle.setSortKeysSorting | setSortKeys?(keys: SortKey[]): void | — | Multi-column sort via core sortTreeMulti: siblings order by the first key, ties broken by each subsequent key ([] restores engine order). Present on the grid + pivot mounts (the flat virtual grid omits it). |
TensorVirtualGrid.sortBySorting | string | — | Sibling sort column (pure re-order via core sortTree). |
TensorVirtualGrid.sortDescSorting | boolean | false | Sibling sort direction. |
mountVirtualGrid *Virtualization | (el: HTMLElement, options: VirtualGridOptions) => MountHandle<VirtualGridOptions> | — | Zero-dependency imperative mount of a windowed scroller (core flattenTreeWindow): a spacer sized total×rowHeight + an absolutely-positioned window re-rendered directly on scroll (O(window) per event). Returns the control handle. |
TensorVirtualGrid *Virtualization | (props: TensorVirtualGridProps) => ReactElement | — | React windowed (virtual-scroll) grid over core, mirroring the vanilla mountVirtualGrid geometry: a spacer sized total×rowHeight + an absolutely-positioned window rendered from flattenTreeWindow (O(window) DOM rows). Display pipeline is filter (quickFilter over row dims) then sort. |
TensorVirtualGrid.heightVirtualization | number | 480 | Scroller height in px. |
TensorVirtualGrid.overscanVirtualization | number | 4 | Extra rows rendered above/below the viewport. |
TensorVirtualGrid.rowHeightVirtualization | number | 28 | Fixed row height in px. |
VirtualGridOptionsVirtualization | interface extends Omit<GridMountOptions, 'showDensityToggle'|'density'|'onDensityChange'> { rowHeight?; height?; overscan?; sortBy?; sortDesc? } | — | Options object for mountVirtualGrid. Inherits all GridMountOptions except the density toggle (fixed rowHeight), plus rowHeight (default 28), height (default 480), overscan (default 4), sortBy (initial sibling sort column), sortDesc (default false). Supports the same opt-in autoGroup. |
Vue TensorVirtualGridVirtualization | defineComponent; props: TensorVirtualGridProps | — | Vue 3 windowed grid over core flattenTreeWindow. Prop interface identical to React TensorVirtualGridProps (data, apiRef, rows, measures, formats, headers, grandTotal, locale, quickFilter, showSearch, searchPlaceholder, enableColumnFilters, rootFilter, cellStyles, colorScales, dataBars, iconSets, sparklines, cellRenderers, sortBy, sortDesc, height=480, rowHeight=28, overscan=4, noRowsMessage, showFooter, footerLabel, showExportButton, onExport, exportLabel, exportFormatted). Vue delta: cellRenderers return VNodeChild. |
TensorGrid.windowColumnsWindow | WindowColumnSpec[] | — | Derived read-only measure columns computed over the built tree via oracle-verified core transforms (runningTotal / rank / pctOfTotal / pctOfParent / delta / movingAverage). Each writes into key `as` and appears as an extra measure column after the base measures. |