View as Markdown

Tree Grid

Tree Grid

DataGrid tree mode for hierarchical data. Nested or flat self-referential rows, expansion, tree keys, filter and paging modes, checkbox cascade, child summaries, drag and indent, and lazy remote children.

A tree grid is DataGrid with the tree option: the same component, engine, columns and API, with rows indented by depth in one column. A second component would repeat every Data Grid prop, event, method and docs page and ship a second renderer, so the tree is a row model of the one grid instead. No TreeGrid alias is exported. Tree mode is opt-in: a grid without tree loads none of the tree code.

Enabling tree mode

Nested rows keep their children in an array field. tree (or tree={{ childrenField: 'children' }}) reads them; the nested rows are taken by reference, never copied:

import { DataGrid } from '@salmonui/data-grid';
import '@salmonui/data-grid/styles.css';

const plan = [
  { id: 'plan', name: 'Planning', hours: 2, children: [{ id: 'scope', name: 'Scope', hours: 4 }] },
  { id: 'launch', name: 'Launch', hours: 2 },
];

<DataGrid data={plan} columns={columns} tree />

Flat self-referential rows name their parent's row id in a field (idMapping + parentIdMapping). The row id comes from getRowId or the primaryKey column; a missing, null or unknown parent id makes a root:

<DataGrid data={employees} columns={columns} getRowId={(row) => row.id} tree={{ parentIdField: 'managerId' }} />

Orphans (an unknown parent id) become roots and cycles break at the first repeated id, each with a development warning. tree is read when the grid is created; its options (filterMode, expandedRows, checkbox, ...) are reactive afterwards.

Tree basics

Open demo

A nested project plan in DataGrid tree mode with the tree column toggle, expand and collapse methods, tree keys, cancelable toggle events, sibling sorting and child summary rows.

Task
ID
Owner
Hours
Planning
plan
Ana
2
Scope
scope
Ana
4
Interviews
interviews
Ben
6
Brief
brief
Ana
3
Budget
budget
Chen
3
Build
build
Dev
1
Backend
backend
Eli
20
API
api
Eli
12
Database
db
Fay
8
Frontend
frontend
Gus
18
Tests
tests
Hal
9
Launch
launch
Ivy
2
Release notes
notes
Ivy
2

Click a chevron, or focus a Task cell and press ArrowRight / ArrowLeft, Ctrl+Shift+ArrowDown / ArrowUp (this row) or Ctrl+ArrowDown / ArrowUp (all rows). Sorting orders siblings inside each parent.

No events yet.

The tree column

The hierarchy shows in the first visible data column, or in the column named by tree.column (field or column id); it follows reordering, pinning and hiding. Its cells hold the expand toggle (DataGridTreeToggle, class .salmon-data-grid-tree-toggle) and an indentation of 1.25rem per depth through padding-inline-start. Rows carry data-depth, data-expanded and data-has-children for styles, and getRowProps(row, index, ctx) receives ctx.tree.

column.renderCell(ctx) on the tree column renders after the toggle, and ctx.tree carries { depth, hasChildren, expanded, loadStatus }. Row templates (renderRow) compose DataGridRow, DataGridCell and DataGridTreeToggle. Detail rows (renderDetail) follow their tree row and hide with it.

Tree templates

Open demo

An org chart in DataGrid tree mode with a tree column cell template that reads ctx.tree, row props and classes per depth, a row template that keeps the toggle, detail rows that follow their tree row, row spans inside each parent, and grid lines and alternate rows.

Details
Unit
Kind
Site
Budget
Engineering open · level 1
Division
Lisbon
Platform open · level 2
Team
Ana Duarte
Person
€98,000
Ben Okafor
Person
€91,000
Chen Wei
Person
Remote
€88,000
Web open · level 2
Team
Berlin
Dara Novak
Person
€94,000
Eli Haddad
Person
€86,000
Operations open · level 1
Division
Berlin
Support open · level 2
Team
Dublin
Fay Murphy
Person
€72,000
Gus Lindqvist
Person
€70,000

Open a person's detail toggle, then collapse the team: the detail row hides with its row and comes back on expand. The remote engineer is flagged by a row class.

Expansion

Option Behavior
defaultExpanded: true (default) Every parent starts expanded.
defaultExpanded: false Every parent starts collapsed.
defaultExpanded: n Parents at depths below n start expanded.
expandedField: 'isExpanded' Initial expansion from a boolean data field (expandStateMapping).
expandedRows: { [rowId]: boolean } Reactive overrides over the default (Salmon).

Methods return a DataGridActionResult:

api.expandAllTreeRows();           // expandAll()
api.collapseAllTreeRows();         // collapseAll()
api.expandTreeLevel(0);            // expandAtLevel(level); 0 is the roots
api.collapseTreeLevel(1);          // collapseAtLevel(level)
api.expandTreeRows(['a', 'b']);    // expandByKey(key)
api.collapseTreeRows('a');         // collapseByKey(key)
api.toggleTreeRow('a', false);     // expandRow / collapseRow (ids, not elements)

onBeforeTreeToggle runs before a row expands or collapses and preventDefault() cancels it; a bulk toggle (expand or collapse all, a level) runs it once per rendered parent that would change, and one cancel cancels the whole command; onTreeToggle follows (expanded / collapsed). Both receive { rowId, row, expanded, depth, lazy, source } with source 'pointer', 'keyboard' or 'api'. Expansion is keyed by row id, so it survives sorting, filtering, paging and data updates, and it is part of the grid state (see State, RTL and adaptive).

Tree expansion state

Open demo

Flat ticket rows with initial expansion from a data field, reactive expandedRows overrides, expansion saved with persistState and getState / restoreState, an orphan and a parent cycle shown as roots, shared grid events, and tree mode winning over a grouping prop.

tree.expandedRows (reactive overrides)
Ticket
ID
Assignee
Points
Checkout redesign
T-1
Ana
13
Order summary
T-5
Dara
3

T-1 starts expanded because its open field is true. Toggle rows, sort, then reload the page: the expansion comes back from storage. With grouping passed too, the grid stays a tree (tree wins; development builds warn).

No events yet.

api.getTreeRow(rowId) returns { rowId, depth, parentId, hasChildren, childCount, expanded, loadStatus, posinset, setsize, context, visible } api.getChildRows(rowId) the kept children in view order (null for the roots), and api.getVisibleRows() the visible rows.

Keyboard and accessibility

The grid root is role="treegrid" in tree mode. Rows carry aria-level (depth + 1), aria-posinset and aria-setsize from the tree index (correct for virtualized rows too), and parents carry aria-expanded; the toggle has no aria-expanded of its own, so the state is announced once.

Keys Behavior
Ctrl+Shift+ArrowDown / ArrowUp (⌘ on macOS) Expand / collapse the focused row
Ctrl+ArrowDown / ArrowUp (⌘ on macOS) Expand / collapse every row
Enter or Space on the toggle Toggle the row
ArrowRight on the tree cell of a collapsed parent Expand (WAI-ARIA treegrid)
ArrowLeft on the tree cell of an expanded parent Collapse; on a collapsed parent or a leaf, move to the parent row
Alt+Shift+ArrowRight / ArrowLeft Indent / outdent the focused or selected rows (Salmon)

The ArrowRight / ArrowLeft tree keys apply when the tree column is the first visible column; ArrowRight and ArrowLeft keep their cell-move meaning everywhere else. The key commands are tree.expandFocused, tree.collapseFocused, tree.indent and tree.outdent; Ctrl+ArrowDown / ArrowUp are the shared group.expandAll / group.collapseAll commands, which expand or collapse every tree row in tree mode. keyBindings can rebind all of them. A polite live region announces "{row} expanded, {count} children", "{row} collapsed", "Loading children" and "Could not load children". The texts are localeText keys: treeExpand, treeCollapse, treeExpanded, treeCollapsed, treeLoading, treeLoadError, treeRetry, treeLevel, indent and outdent. See Accessibility for the rest of the grid.

Sorting, filtering and searching

Sorting orders siblings within each parent; a row never moves under another parent. Filtering and search keep rows by tree.filterMode:

filterMode Rows kept
'ancestors' (default) Matches and their ancestor chain
'descendants' Matches and their subtrees
'both' Matches, their ancestors and their subtrees
'none' Matches only, re-parented to their nearest kept ancestor

Rows kept only as context carry data-tree-context and are dimmed. A filter never changes the expansion state: a match inside a collapsed parent stays hidden until the parent expands, so call expandTreeRows from onFilterChange to reveal matches. Excel and checkbox filter lists count matching rows of every depth.

Tree filtering and paging

Open demo

Flat self-referential rows (parentIdField) with a filter row, the four tree filter modes, sibling sorting and paging by visible rows or by root rows.

Name
ID
Role
City
Mara Quist
e0
CEO
Oslo
Ada Director
e1
Director
Lyon
Dee Director
e20
Director
Oslo
Gil Director
e39
Director
Porto
Jo Director
e58
Director
Kyoto

Type Lyon in the City filter: ancestors keeps each match with its managers, descendants keeps matches with their reports, none lists matches only. Rows kept only as context are dimmed.

Paging

tree.pageBy: 'all' (default) pages the visible rows; 'root' pages root rows with their subtrees. Expanding or collapsing re-pages without a remote read.

<DataGrid data={rows} columns={columns} tree={{ parentIdField: 'parentId', pageBy: 'root' }} paging={{ pageSize: 10 }} />

Checkboxes and selection

tree.checkbox: true adds a checkbox after the toggle (column showCheckbox). The checkbox state is the row selection, so api.getSelectedRows(), api.getSelectedRowIds() and api.selectRows(rowIds) replace getCheckedRecords, getCheckedRowIndexes and selectCheckboxes, and onBeforeSelectionChange / onSelectionChange report target: 'checkbox' (checkboxChange).

checkbox.cascade Behavior
false (default) The checkbox selects its row only
true A parent selects or deselects its whole subtree
'filtered' The cascade reaches only rows the filter keeps

A subtree toggle is one range command over the tree, not one event per row. A partly selected parent shows the indeterminate state (aria-checked="mixed"), derived from descendant counts, never stored per row. Selection is id-based: collapsing a parent never deselects its rows, and a cascade reaches hidden descendants.

Tree checkbox cascade

Open demo

Checkboxes in the tree column whose state is the row selection, with self, hierarchy and filtered hierarchy cascade modes and tri-state parents.

Name
Path
KB
src
src
0
app
src/app
0
page.tsx
src/app/page.tsx
4
layout.tsx
src/app/layout.tsx
2
lib
src/lib
0
api.ts
src/lib/api.ts
7
format.ts
src/lib/format.ts
3
theme.ts
src/lib/theme.ts
1
index.ts
src/index.ts
1
docs
docs
0
guide.md
docs/guide.md
12
api.md
docs/api.md
9
package.json
package.json
1

Checked: none

No events yet.

Aggregates and child summaries

Footer aggregates cover the kept rows of every depth. renderChildFooter on an aggregate adds a child summary row under each expanded parent, over its descendants; renderFooter and renderChildFooter are the footer templates. An aggregate with only renderChildFooter does not show in the grid footer.

<DataGrid
  data={plan}
  columns={columns}
  tree
  aggregates={[{ columns: [{ field: 'hours', type: 'sum', renderChildFooter: ({ formatted }) => <>Subtotal {formatted.sum}</> }] }]}
/>

Tree aggregates and filters

Open demo

A flat budget tree with footer aggregates of several types and templates, child summary rows, Excel and checklist filters whose value lists count rows of every depth, expansion that survives sorting, filtering and paging, and the tree row info methods.

Item
ID
Owner
Status
Cost
Billable
Marketing
mkt
Ana
Open
$1,200
false
Search ads
mkt-ads
Ana
Open
$5,000
false
Sales
sales
Dara
Open
$900
false
CRM licences
sales-crm
Dara
Blocked
$4,300
false
IT
it
Gus
Open
$500
false
Laptops
it-laptops
Gus
Done
$9,900
false

Open the Status or Owner filter: the value list counts rows of every depth, not only roots. Expand a row, then sort, filter or change the page: the expansion stays because it is keyed by row id.

No events yet.

Editing

Cell, row, dialog and batch editing, the command column and validation work in a tree; editing the tree column keeps the toggle, and batch editing works with row virtualization. editing.newRowPosition places added rows:

newRowPosition Added row
'top' (default), 'bottom' First or last root
'above', 'below' Sibling before or after the focused row
'child' Last child of the focused row

An added row joins its parent: WriteRequest.added carries its parentId and the local source inserts it into the tree. Deleting a parent deletes its subtree: api.deleteRows(rowIds) writes every descendant id in WriteRequest.deleted.

Drag, indent and outdent

rowDrag in tree mode drops before a row (top quarter), into it (middle half) or after it (bottom quarter). Dragging a parent moves its subtree; dropping a row into itself or its own descendant is invalid with reason 'descendant'. onRowDragStart, onRowDrag, onBeforeRowDrop (cancel) and onRowDrop report position ('before', 'after', 'into') and parentId; api.moveRows(rowIds, { targetRowId, position }) replaces reorderRows. Selection and a primary key column are not required. rowDrag.targetId drops into another grid and onto custom targets with the subtrees in the payload.

api.indentRows(rowIds) makes rows the last children of their previous sibling and api.outdentRows(rowIds) makes them siblings after their parent; the toolbar items 'indent' and 'outdent' are disabled when the focused row cannot move. Alt+Shift+ArrowRight / ArrowLeft is the keyboard alternative. Flat data writes the changed parent id field, so a remote source can persist the move.

<DataGrid data={steps} columns={columns} tree={{ parentIdField: 'parentId' }} rowDrag toolbar={['indent', 'outdent']} />

The toolbar and context menu work as in a flat grid, plus the tree items.

Tree drag and indent

Open demo

Flat tree rows reordered by drag (before, after or into a row), the indent and outdent toolbar items, methods and keys, new rows above, below or as a child of the focused row, and subtree delete.

Reorder
Step
ID
Days
Design
s1
5
Wireframes
s2
3
Visual review
s3
1
Implementation
s4
12
Data layer
s5
4
Screens
s6
6
Accessibility pass
s7
2
Ship
s8
1
Retro
s9
1

Drag a grip onto the middle of a row to drop into it, near its top or bottom edge to drop before or after. Alt+Shift+ArrowRight / ArrowLeft indents or outdents the focused row. Deleting a parent deletes its subtree.

No events yet.

Tree drag to other targets

Open demo

Rows of a nested backlog tree dragged into another tree grid (before, after or into a row) or onto a custom archive element, with each parent's subtree travelling along in the drop payload.

Reorder
Story
Points
Search
8
Saved filters
3
Typo tolerance
5
German stemming
2
Export
5
PDF page numbers
2
Dark mode polish
3
Reorder
Story
Points
Sprint 14 goal
0
Archive: drop backlog rows here

Drag a parent by its grip: its subtree travels with it, into the sprint grid (before, after or into a row) or onto the archive element.

No events yet.

Remote and lazy children

Rows whose children load on demand name a boolean field in tree.hasChildrenField. Such a row renders collapsed with a toggle, on the server and the client alike, and its children load on the first expand:

  • Local data: tree.loadChildren({ rowId, row, signal }) returns the children (or a promise of them); they join the data under the row.
  • A remote data source (mode: 'remote'): the grid reads read({ parentRowId: null }) for the roots and read({ parentRowId }) on expand. Items are tree envelopes { kind: 'tree', row, parentId, hasChildren, childCount, children }; children are cached per parent until the query changes. createJsonDataSource from @salmonui/data sends the parent on the wire, and the reference handler (@salmonui/data/server) serves tree levels with a parentField.

The grid wires a remote source through createRemoteTree(source, { getRowId, onError }) from @salmonui/data-grid/engine/tree-remote, loaded only when a remote source is in tree mode; call it yourself only when you build an engine without DataGrid. Envelopes that carry children load whole subtrees at once (loadChildOnDemand: false), remote nested data is accepted, and the query (filter, search, sort) travels with root and child reads, so a server that returns matches with their ancestor chain keeps a lazy tree filtered. pageBy: 'root' pages roots on the server. createOfflineDataSource, createControlledDataSource with request.parentRowId and server aggregates (DataSourceResult.aggregates) work in tree mode.

While children load, the toggle shows a spinner, the row carries aria-busy and api.getTreeRow(rowId).loadStatus is 'loading'; then 'loaded', or 'error' after a failed read, which calls onError with action: 'treeChildren' and the rowId. Clicking the toggle again or api.reloadTreeChildren(rowId) retries (Salmon). Rows of a lazy parent being loaded can show skeleton rows (virtualization.skeletonRows).

Tree lazy children

Open demo

A remote tree whose children load on expand through read({ parentRowId }), with the per-row load status, a failed child read reported by onError and a retry.

Folder
ID
Items

Roots load first; expanding a folder reads its children once (the toggle spins while loading) and caches them. A failed read sets loadStatus to error; retry with the button or the toggle.

No events yet.

Tree data sources

Open demo

One catalog tree over five data sources - an offline source that loads once, a controlled source that answers each read by parentRowId with paged roots, nested envelopes that load whole subtrees, the @salmonui/data JSON source over the reference server handler with server filtering and aggregates, and infinite scroll over blocks of root rows with skeleton rows.

Item
ID
Stock
No records to display

Expand rows and watch the reads in the log. With the server source, search "sencha" or filter Item: the server returns the matches with their ancestor chain, and the footer total comes from the server. With infinite scroll, scroll down for more roots and expand one to see a skeleton row while its children load.

No events yet.

Export, print and copy

Exports write the tree view: Excel rows get an outline level per depth (clamped at 7), PDF indents the tree column, and CSV writes rows in visible pre-order. tree: 'expanded' (default) exports the visible rows; tree: 'all' exports every kept row regardless of expansion:

await api.exportToExcel({ tree: 'all', outlineCollapsed: true }); // collapsed parents stay collapsed in Excel
await api.exportToCsv({ tree: 'all', treeDepthColumn: 'Level' });  // adds a depth column (true: "Depth")

Server export runs the same model with depths. print() prints the expanded view with indentation, or every row with printing={{ tree: 'all' }} or print({ tree: 'all' }). tree.copyMode widens api.copy() and Ctrl+C with the copied rows' ancestors ('ancestors', default), descendants, both, or none. See Export and Print.

Tree export, print and copy

Open demo

A bill of materials in tree mode exported to Excel with outline levels, CSV with a depth column and PDF with indentation, either the expanded rows or every row, a server export of the same tree and state, print with indentation, and copy that adds ancestors or descendants.

Part
Part no.
Qty
Unit cost
City bike
bike
1
€0.00
Frame set
frame
1
€0.00
Aluminium frame
frame-tube
1
€120.00
Fork
frame-fork
1
€45.00
Wheel set
wheels
1
€0.00
Rim
wheel-rim
2
€28.00
Spoke
wheel-spokes
64
€0.40
Tyre
wheel-tyre
2
€22.00
Drivetrain
drive
1
€0.00
Chain
drive-chain
1
€18.00
Hub gear
drive-hub
1
€140.00
Light kit
lights
1
€0.00
Front light
lights-front
1
€25.00
Rear light
lights-rear
1
€12.00

Collapse Wheel set, then export with each row scope. Excel writes an outline level per depth and, with all rows, keeps collapsed parents collapsed; PDF and print indent the Part column. Select Spoke and press Ctrl+C or Copy: the copy adds the rows the copy mode names.

No events yet.

State, RTL and adaptive

persistState, api.getState() and api.restoreState() include the tree expansion as tree.expandedRows. With dir="rtl" the indentation, the chevron, ArrowRight / ArrowLeft and the indent keys mirror. Adaptive vertical rows show the toggle and "Level n" in each card instead of the indentation, with a 44 × 44 px toggle target.

Tree RTL, locale and adaptive

Open demo

An office tree in right-to-left mode with mirrored indentation, chevrons and keys, German localeText for the tree strings, locale number, currency and date formats, a lookup column and validation while editing, and adaptive cards that show the toggle and the level.

Anordnen
Standort
Land
Umsatz
Eröffnet
EMEA
Deutschland
0,00 €
1. März 2014
Berlin
Deutschland
1.284.500,50 €
1. März 2014
Munich
Deutschland
642.100,00 €
15. Sept. 2019
Dubai
Vereinigte Arabische Emirate
918.250,75 €
9. Jan. 2017
Cairo
Ägypten
311.900,00 €
20. Juni 2021
APAC
Singapur
0,00 €
3. Nov. 2016
Singapore
Singapur
1.050.000,00 €
3. Nov. 2016
Kuala Lumpur
Malaysia
402.330,20 €
27. Apr. 2020

In right-to-left mode the indentation and chevrons mirror, and ArrowLeft expands while ArrowRight collapses; Alt+Shift+ArrowLeft indents. The toolbar items, the toggle labels and the expand announcements follow the language, and numbers, currency and dates follow the locale. Edit a revenue below zero or clear an office name to see validation; the Country column edits a lookup.

With other features

Tree mode keeps the rest of the grid: columns and column chrome (templates, types, formats, lookup columns, resize, reorder, auto-fit, pinning, column menu and chooser, stacked headers), row and column spans (a row span ends at a parent boundary), lookup columns and validation, templates and theming, globalization, and every shared Data Grid method and event. Row virtualization is always on over the tree view, with no per-row materialization, and it works with checkboxes, detail and row templates, batch editing, cell selection and variable heights. Column virtualization keeps the toggle on the tree column. Infinite scroll loads blocks of root rows and allows a collapsed initial state: with a remote source and infiniteScroll={{ blockSize, initialBlocks, threshold }} the first read asks for initialBlocks blocks of root rows (read({ parentRowId: null, range })) and scrolling near the last tree row reads the next block. Children still load on expand. Expansion, detail rows, editing and selectRows by id keep working across block loads. cache, maxBlocks, initialResult and api.engine.infiniteScroll do not apply in tree mode; blocks are appended as they land.

tree does not combine with grouping or childGrid: tree wins and a development warning names the ignored prop. Use renderDetail for detail rows under tree rows.

Large tree

Open demo

A 28,208-row sales tree with 24 month columns under stacked year headers, row and column virtualization, cascading checkboxes, batch editing across scrolled-out rows, and resize, reorder, pin, column menu and chooser on a tree.

Unit
ID
Budget
2025
2026
Jan
Feb
Mar
Apr
May
Jun
Jul
Aug
Sep
Oct
Nov
Dec
Jan
Feb
Mar
Apr
May
Jun
North region
r0
$16,317,000
1,087,800
1,590,908
1,536,518
1,482,128
1,427,738
1,373,348
1,318,958
1,264,568
1,210,178
1,155,788
1,101,398
1,604,505
1,101,398
1,604,505
1,550,115
1,495,725
1,441,335
1,386,945

Expand all, scroll, then edit Budget cells far apart: batch drafts survive scrolling out of view. Check a region to select its whole subtree. Resize, reorder, pin or hide columns through the header, column menu or chooser; the Unit column keeps its toggle.

No events yet.

Server rendering

Tree mode renders on the server: nested and flat rows, the toggle, the indentation and the treegrid ARIA attributes are in the server markup, so hydration does not change them. Lazy parents (hasChildrenField) render collapsed with a toggle and never load children on the server; child reads, the key handlers and the skeleton row start after mount. persistState reads its storage only after mount, so a restored expansion applies after hydration, not in the server markup.

Virtualization and data updates

  • There is no separate DOM virtualization mode: rows are always DOM-virtualized with one model, and buffer sizes, DOM pools and scroll throttling are internal, held to the scroll budgets. Tune the overscan with virtualization.rowOverscan, and use estimatedRowHeight for measured, variable row heights.
  • There is no immutable mode: the engine always applies data changes as id-keyed row deltas, so a mode switch would only add a slower default. Keep stable row ids (getRowId), which tree mode needs anyway; setRowData, setCellValue and new data arrays are diffed by row id.

API reference

The tree prop is DataGridTree, the tree methods are DataGridTreeApi on DataGridApi, the row info is DataGridTreeRowInfo, the toggle events are DataGridTreeToggleEvent, ctx.tree is DataGridTreeContext, and row templates use DataGridTreeToggle.

Performance

The tree index is built once per data identity in typed arrays (no per-row objects) and patched on row changes: a move, indent or outdent splices the moved subtree into the index instead of rebuilding it. The visible rows are a list of ranges, so expanding or collapsing a branch and every scroll lookup are independent of the row count. The budgets are: index build of 50,000 rows ≤ 25 ms, one branch ≤ 16 ms, expand all ≤ 60 ms, a cascade over 100,000 descendants ≤ 16 ms, sibling sort and 'ancestors' filter of 1,000,000 rows within 1.2 × the flat budgets once the sort keys are cached (and within 1.86 × the same query on a flat grid from cold), indent, outdent or a drop into a row of a million-row tree ≤ 16 ms to painted, and the flat scroll budgets on a fully expanded million-row tree. The demo below generates either benchmark tree and shows each measured time next to its budget.

Tree performance

Open demo

Generate the 50,000-row or the 1,000,000-row benchmark tree and read the measured time of grid creation, expand and collapse, a 100,000-row cascade, sibling sort, an ancestors filter, indent and outdent next to the tree mode release budgets.

Showing a 36-row preview. Pick a fixture and press "Generate and measure"; nothing is timed until you do.

Reorder
ID
Text 0
Text 1
Text 2
Text 3
Number 4
Number 5
Number 6
Date 7
Date 8
Flag 9
t0
word-30-252
word-63-261
word-3i-794
word-5h-43
83,232
69,247
81,586
Aug 25, 2025
Jun 18, 2025
true
t6
word-4s-68
word-r-813
word-5a-610
word-5-595
57,952
28,319
66,130
Aug 9, 2025
May 22, 2025
false
t22
word-s-732
word-5n-557
word-4u-906
word-1h-707
77,648
50,159
87,554
Jun 16, 2025
Dec 15, 2025
true
t25
word-6j-965
word-26-682
word-2d-115
word-4w-744
76,399
38,466
70,585
Jul 20, 2025
Aug 25, 2025
false
t28
word-6m-722
word-39-523
word-28-520
word-33-9
29,058
84,121
81,508
May 11, 2025
Oct 9, 2025
false
t8
word-4i-878
word-49-607
word-10-84
word-1f-869
71,766
99,997
64,280
Feb 1, 2025
Oct 18, 2025
false
t13
word-1z-249
word-6y-750
word-h-623
word-1o-140
21,611
3,918
88,341
Dec 2, 2025
Jan 19, 2025
false
t10
word-6g-208
word-13-841
word-2i-710
word-6p-479
21,564
17,739
430
Sep 18, 2025
Nov 27, 2025
true
t27
word-6h-127
word-1g-788
word-3-757
word-3q-146
28,109
78,120
22,087
Nov 4, 2025
Apr 11, 2025
true
t33
word-1v-573
word-5i-962
word-31-171
word-6g-208
46,695
30,362
15,761
Mar 22, 2025
Jan 22, 2025
false
t11
word-55-15
word-5g-124
word-2b-277
word-46-850
14,525
77,464
79,287
Dec 1, 2025
May 25, 2025
false
t21
word-v-489
word-6q-398
word-4p-311
word-6s-236
31,683
53,830
29,229
Nov 10, 2025
Jul 31, 2025
false
t23
word-3h-875
word-54-96
word-53-177
word-4q-230
4,129
95,788
22,587
Jul 13, 2025
Mar 18, 2025
false
t31
word-45-931
word-6o-560
word-3z-417
word-4i-878
69,529
21,668
53,779
Jan 4, 2025
Apr 8, 2025
false
t1
word-6e-370
word-d-947
word-8-352
word-5j-881
43,386
1,329
81,916
Jan 21, 2025
Mar 23, 2025
true
t3
word-x-327
word-c-28
word-6z-669
word-u-570
44,709
84,000
54,815
Aug 5, 2025
Mar 3, 2025
true
t14
word-2s-900
word-37-685
word-1i-626
word-t-651
75,224
38,935
84,426
Mar 18, 2025
Nov 28, 2025
true
t16
word-4a-526
word-1d-31
word-64-180
word-3v-741
78,542
73,909
46,768
Aug 29, 2025
Feb 14, 2025
false
t20
word-3a-442
word-2l-467
word-o-56
word-47-769
35,274
93,217
64,236
Aug 25, 2025
Jan 20, 2025
false
t9
word-1n-221
word-2m-386
word-11-3
word-1s-816
88,831
76,786
77,033
Sep 5, 2025
Jun 26, 2025
true

The tree code is a prop-gated chunk (@salmonui/data-grid/engine/tree ≤ 13.1 KB, the tree render feature with it ≤ 20.5 KB gzip); the Minimal DataGrid app does not grow. Bundle size has no demo: it is verified by npm run bundle:check (tooling/checks/bundle-size.mjs) in npm run release:verify. See Performance.