TreeTable

TreeTable is used to display hierarchical data in tabular format.

Name
Size
Type
PREVIEW

TreeTable requires a collection of TreeNode instances as a value and Column components as children for the representation. The column with the element to toggle a node should have expander enabled.

basic-demo

In addition to a regular table, alternatives with alternative sizes are available.

size-demo

Enabling showGridlines displays grid lines.

grid_lines-demo

Single node selection is configured by setting selectionMode as single along with selectionKeys property to manage the selection value binding.

By default, metaKey press (e.g. ⌘) is necessary to unselect a node however this can be configured with disabling the metaKeySelection property. In touch enabled devices this option has no effect and behavior is same as setting it to false.

single_row_selection-demo

More than one node is selectable by setting selectionMode to multiple. By default in multiple selection mode, metaKey press (e.g. ⌘) is not necessary to add to existing selections. When the optional metaKeySelection is present, behavior is changed in a way that selecting a new node requires meta key to be present. Note that in touch enabled devices, TreeTable always ignores metaKey.

In multiple selection mode, value binding should be a key-value pair where key is the node key and value is a boolean to indicate selection.

multiple_rows_selection-demo

Selection of multiple nodes via checkboxes is enabled by configuring selectionMode as checkbox.

In checkbox selection mode, value binding should be a key-value pair where key (or the dataKey) is the node key and value is an object that has checked and partialChecked properties to represent the checked state of a node.

checkbox_row_selection-demo

TreeTable has full keyboard support. Arrow Up and Down move focus between rows, Arrow Right and Left expand and collapse a node, Space or Enter toggles the selection of the focused row and Shift with Arrow keys extends the range. Pair selectionMode multiple with metaKeySelection for a fully keyboard-driven flow.

keyboard_selection-demo

TreeTable provides nodeSelect and nodeUnselect events to listen selection events.

row_selection_events-demo

Sorting on a column is enabled by adding the sortable property.

single_sort-demo

Multiple columns can be sorted by defining sortMode as multiple. This mode requires metaKey (e.g. ⌘) to be pressed when clicking a header.

multiple_sort-demo

Apply an initial sort on mount using sortField and sortOrder. Headers stay interactive afterwards.

presort-demo

Apply an initial multi-column sort on mount by setting sortMode to multiple together with multiSortMeta. Each header keeps a badge with its sort order and stays interactive afterwards.

multiple_presort-demo

When removableSort is present, the third click removes the sorting from the column.

removable_sort-demo

Pagination is enabled by adding paginator property and defining rows per page.

paginator_basic-demo

Paginator UI is customized using the paginatorTemplate property. Each element can also be customized further with your own UI to replace the default one, refer to the Paginator component for more information about the advanced customization options.

paginator_template-demo

Pagination is enabled by adding paginator property and defining rows per page.

paginator_headless-demo

Adding scrollable property along with a scrollHeight for the data viewport enables vertical scrolling with fixed headers.

Name
Size
Type
Folder 1
—
Folder
Document 1.1
50kb
Document
Text 1.2
163kb
Text
Picture 1.3
276kb
Picture
Video 1.4
389kb
Video
Document 1.5
502kb
Document
Text 1.6
615kb
Text
Folder 2
—
Folder
Document 2.1
87kb
Document
Text 2.2
200kb
Text
Picture 2.3
313kb
Picture
Video 2.4
426kb
Video
Document 2.5
539kb
Document
Text 2.6
652kb
Text
vertical_scroll-demo

Horizontal scrollbar is displayed when table width exceeds the parent width.

horizontal_scroll-demo

Flex scroll feature makes the scrollable viewport section dynamic instead of a fixed value so that it can grow or shrink relative to the parent size of the table. Click the button below to display a maximizable Dialog where data viewport adjusts itself according to the size changes.

flex_scroll-demo

A column can be fixed during horizontal scrolling by enabling the frozen property on a Column. The location is defined with the alignFrozen that can be left or right.

Name
Size
Type
Owner
Modified
Actions
Folder 1
—
Folder
Amy Elsner
2026-01-15
Open · Share
Document 1.1
50kb
Document
Amy Elsner
2026-01-20
Open · Share
Text 1.2
163kb
Text
Anna Fali
2026-02-20
Open · Share
Picture 1.3
276kb
Picture
Bernardo Dominic
2026-03-20
Open · Share
Video 1.4
389kb
Video
Ioni Bowcher
2026-04-20
Open · Share
Document 1.5
502kb
Document
Stephen Shaw
2026-05-20
Open · Share
Folder 2
—
Folder
Anna Fali
2026-02-15
Open · Share
Document 2.1
87kb
Document
Anna Fali
2026-02-20
Open · Share
Text 2.2
200kb
Text
Bernardo Dominic
2026-03-20
Open · Share
Picture 2.3
313kb
Picture
Ioni Bowcher
2026-04-20
Open · Share
Video 2.4
426kb
Video
Stephen Shaw
2026-05-20
Open · Share
Document 2.5
539kb
Document
Amy Elsner
2026-06-20
Open · Share
frozen_columns-demo

Columns can be resized with drag and drop when resizableColumns is enabled. Default resize mode is fit that does not change the overall table width.

resize_fitmode-demo

Setting columnResizeMode as expand changes the table width as well.

resize_expandmode-demo

Columns can be shown, hidden and reordered through a popover that holds a draggable, checkable list of the available columns.

column_toggle-demo

Filtering is enabled by adding a filter template to a Column along with the filters property. The match strategy of a column is configured with filterMatchMode, and a global entry in filters searches across all columns at once. The filterMode defaults to lenient so when a node matches, its descendants are kept without further filtering.

filter-demo

Lazy mode is handy to deal with large datasets, instead of loading the entire data, small chunks of data is loaded by invoking corresponding callbacks everytime paging, sorting and filtering occurs. Sample below imitates lazy loading data from a remote datasource using an in-memory list and timeouts to mimic network connection.

Enabling the lazy property and assigning the logical number of rows to totalRecords by doing a projection query are the key elements of the implementation so that paginator displays the UI assuming there are actually records of totalRecords size although in reality they are not present on page, only the records that are displayed on the current page exist.

In addition, only the root elements should be loaded, children can be loaded on demand using nodeExpand callback.

lazy_load-demo

The loading property displays a mask overlay with a spinner while data is being fetched. Use the loadingicon slot to customize the overlay content.

loading_mask-demo

Skeleton component can be used as a placeholder during the loading process.

loading_skeleton-demo

A custom empty state is displayed through the empty slot when the value is an empty array.

Name
Size
Type

No folders yet

Create your first folder to start building a tree.

empty-demo

Columns can be created programmatically.

dynamic_columns-demo

Custom content at header and footer slots are supported via templating.

template-demo

Expansion state is controlled with expandedKeys property. The expandedKeys should be an object whose keys refer to the node key and values represent the expanded state e.g. {'0-0': true}.

controlled-demo

TreeTable has exclusive integration with ContextMenu using the contextMenu event to open a menu on right click along with contextMenuSelection property and row-contextmenu event to control the selection via the menu.

contextmenu-demo

Screen Reader

DataTable uses a treegrid element whose attributes can be extended with the tableProps option. This property allows passing aria roles and attributes like aria-label and aria-describedby to define the table for readers. Default role of the table is table. Header, body and footer elements use rowgroup, rows use row role, header cells have columnheader and body cells use cell roles. Sortable headers utilizer aria-sort attribute either set to "ascending" or "descending".

Row elements manage aria-expanded for state along with aria-posinset, aria-setsize and aria-level attribute to define the hierachy.

When selection is enabled, aria-selected is set to true on a row. In checkbox mode, TreeTable component uses a hidden native checkbox element.

Editable cells use custom templating so you need to manage aria roles and attributes manually if required.

Paginator is a standalone component used inside the DataTable, refer to the paginator for more information about the accessibility features.

Sortable Headers Keyboard Support

KeyFunction
tabMoves through the headers.
enterSorts the column.
spaceSorts the column.

Keyboard Support

KeyFunction
tab Moves focus to the first selected node when focus enters the component, if there is none then first element receives the focus. If focus is already inside the component, moves focus to the next focusable element in the page tab sequence.
shift + tab Moves focus to the last selected node when focus enters the component, if there is none then first element receives the focus. If focus is already inside the component, moves focus to the previous focusable element in the page tab sequence.
enterSelects the focused treenode.
spaceSelects the focused treenode.
down arrowMoves focus to the next treenode.
up arrowMoves focus to the previous treenode.
right arrowIf node is closed, opens the node otherwise moves focus to the first child node.
left arrowIf node is open, closes the node otherwise moves focus to the parent node.
homeMoves focus to the first same-level node.
endMoves focus to the last same-level node.
Theme Designer