# treetable

```ts
import { TreeTableModule } from '@anguless/angulux/treetable';
```

## TreeTable

`agl-treeTable, agl-treetable, agl-tree-table` — component

Inherits every input, output and slot of `BaseComponent` — see [basecomponent.md](basecomponent.md).

TreeTable is used to display hierarchical data in tabular format.

| Input | Type | Default | Description |
| --- | --- | --- | --- |
| `columns` | `any[] \| undefined` | _not documented_ | An array of objects to represent dynamic columns. |
| `styleClass` | `string \| undefined` | _not documented_ | Style class of the component. **Deprecated:** since v20.0.0, use `class` instead. |
| `tableStyle` | `{ [klass: string]: any } \| null \| undefined` | _not documented_ | Inline style of the table. |
| `tableStyleClass` | `string \| undefined` | _not documented_ | Style class of the table. |
| `autoLayout` | `boolean \| undefined` | _not documented_ | Whether the cell widths scale according to their content or not. |
| `lazy` | `boolean` | _not documented_ | Defines if data is loaded and interacted with in lazy manner. |
| `lazyLoadOnInit` | `boolean` | _not documented_ | Whether to call lazy loading on initialization. |
| `paginator` | `boolean \| undefined` | _not documented_ | When specified as true, enables the pagination. |
| `rows` | `number \| undefined` | _not documented_ | Number of rows to display per page. |
| `first` | `number` | _not documented_ | Index of the first row to be displayed. |
| `pageLinks` | `number` | _not documented_ | Number of page links to display in paginator. |
| `rowsPerPageOptions` | `any[] \| undefined` | _not documented_ | Array of integer/object values to display inside rows per page dropdown of paginator |
| `alwaysShowPaginator` | `boolean` | _not documented_ | Whether to show it even there is only one page. |
| `paginatorPosition` | `'top' \| 'bottom' \| 'both'` | _not documented_ | Position of the paginator. |
| `paginatorStyleClass` | `string \| undefined` | _not documented_ | Custom style class for paginator |
| `paginatorDropdownAppendTo` | `HTMLElement \| ElementRef \| TemplateRef<any> \| string \| null \| undefined \| any` | _not documented_ | Target element to attach the paginator dropdown overlay, valid values are "body" or a local ng-template variable of another element (note: use binding with brackets for template variables, e.g. [appendTo]="mydiv" for a div element having #mydiv as variable name). |
| `currentPageReportTemplate` | `string` | _not documented_ | Template of the current page report element. Available placeholders are {currentPage},{totalPages},{rows},{first},{last} and {totalRecords} |
| `showCurrentPageReport` | `boolean \| undefined` | _not documented_ | Whether to display current page report. |
| `showJumpToPageDropdown` | `boolean \| undefined` | _not documented_ | Whether to display a dropdown to navigate to any page. |
| `showFirstLastIcon` | `boolean` | _not documented_ | When enabled, icons are displayed on paginator to go first and last page. |
| `showPageLinks` | `boolean` | _not documented_ | Whether to show page links. |
| `defaultSortOrder` | `number` | _not documented_ | Sort order to use when an unsorted column gets sorted by user interaction. |
| `sortMode` | `'single' \| 'multiple'` | _not documented_ | Defines whether sorting works on single column or on multiple columns. |
| `resetPageOnSort` | `boolean` | _not documented_ | When true, resets paginator to first page after sorting. |
| `customSort` | `boolean \| undefined` | _not documented_ | Whether to use the default sorting or a custom one using sortFunction. |
| `selectionMode` | `string \| undefined` | _not documented_ | Specifies the selection mode, valid values are "single" and "multiple". |
| `contextMenuSelection` | `any` | _not documented_ | Selected row with a context menu. |
| `contextMenuSelectionMode` | `string` | _not documented_ | Mode of the contet menu selection. |
| `dataKey` | `string \| undefined` | _not documented_ | A property to uniquely identify a record in data. |
| `metaKeySelection` | `boolean \| undefined` | _not documented_ | Defines whether metaKey is should be considered for the selection. On touch enabled devices, metaKeySelection is turned off automatically. |
| `compareSelectionBy` | `string` | _not documented_ | Algorithm to define if a row is selected, valid values are "equals" that compares by reference and "deepEquals" that compares all fields. |
| `rowHover` | `boolean \| undefined` | _not documented_ | Adds hover effect to rows without the need for selectionMode. |
| `loading` | `boolean \| undefined` | _not documented_ | Displays a loader to indicate data load is in progress. |
| `loadingIcon` | `string \| undefined` | _not documented_ | The icon to show while indicating data load is in progress. |
| `showLoader` | `boolean` | _not documented_ | Whether to show the loading mask when loading property is true. |
| `scrollable` | `boolean \| undefined` | _not documented_ | When specified, enables horizontal and/or vertical scrolling. |
| `scrollHeight` | `string \| undefined` | _not documented_ | Height of the scroll viewport in fixed pixels or the "flex" keyword for a dynamic size. |
| `virtualScroll` | `boolean \| undefined` | _not documented_ | Whether the data should be loaded on demand during scroll. |
| `virtualScrollItemSize` | `number \| undefined` | _not documented_ | Height of a row to use in calculations of virtual scrolling. |
| `virtualScrollOptions` | `ScrollerOptions \| undefined` | _not documented_ | Whether to use the scroller feature. The properties of scroller component can be used like an object in it. |
| `virtualScrollDelay` | `number` | _not documented_ | The delay (in milliseconds) before triggering the virtual scroll. This determines the time gap between the user's scroll action and the actual rendering of the next set of items in the virtual scroll. |
| `frozenWidth` | `string \| undefined` | _not documented_ | Width of the frozen columns container. |
| `frozenColumns` | `{ [klass: string]: any } \| null \| undefined` | _not documented_ | An array of objects to represent dynamic columns that are frozen. |
| `resizableColumns` | `boolean \| undefined` | _not documented_ | When enabled, columns can be resized using drag and drop. |
| `columnResizeMode` | `string` | _not documented_ | Defines whether the overall table width should change on column resize, valid values are "fit" and "expand". |
| `reorderableColumns` | `boolean \| undefined` | _not documented_ | When enabled, columns can be reordered using drag and drop.  Accessibility, a known limit: a column moves by drag and drop only, and no key moves it (WCAG 2.1.1). Where the order matters to the task, offer another way to change it, for example a list of the columns with Move up and Move down buttons that sets `columns`. |
| `contextMenu` | `any` | _not documented_ | Local ng-template varilable of a ContextMenu. |
| `rowTrackBy` | `Function` | _not documented_ | Function to optimize the dom operations by delegating to ngForTrackBy, default algorithm checks for object identity. |
| `filters` | `{ [s: string]: FilterMetadata \| undefined }` | _not documented_ | An array of FilterMetadata objects to provide external filters. |
| `globalFilterFields` | `string[] \| undefined` | _not documented_ | An array of fields as string to use in global filtering. |
| `filterDelay` | `number` | _not documented_ | Delay in milliseconds before filtering the data. |
| `filterMode` | `string` | _not documented_ | Mode for filtering valid values are "lenient" and "strict". Default is lenient. |
| `filterLocale` | `string \| undefined` | _not documented_ | Locale to use in filtering. The default locale is the host environment's current locale. |
| `paginatorLocale` | `string \| undefined` | _not documented_ | Locale to be used in paginator formatting. |
| `totalRecords` | `number` | _not documented_ | Number of total records, defaults to length of value when not defined. |
| `sortField` | `string \| undefined \| null` | _not documented_ | Name of the field to sort data by default. |
| `sortOrder` | `number` | `1` | Order to sort when default sorting is enabled. |
| `multiSortMeta` | `SortMeta[] \| undefined \| null` | `null` | An array of SortMeta objects to sort the data by default in multiple sort mode. |
| `selection` | `any` | `null` | Selected row in single mode or an array of values in multiple mode. |
| `value` | `TreeNode<any>[] \| undefined` | `null` | An array of objects to display. |
| `virtualRowHeight` | `number` | `28` | Indicates the height of rows to be scrolled. **Deprecated:** use virtualScrollItemSize property instead. |
| `selectionKeys` | `any` | _not documented_ | A map of keys to control the selection state. |
| `showGridlines` | `boolean` | `false` | Whether to show grid lines between cells. |

| Output | Type | Description |
| --- | --- | --- |
| `selectionChange` | `EventEmitter<TreeTableNode<any> \| TreeTableNode<any>[] \| null>` | Callback to invoke on selected node change. |
| `contextMenuSelectionChange` | `EventEmitter<TreeTableNode>` | Callback to invoke on context menu selection change. |
| `onFilter` | `EventEmitter<TreeTableFilterEvent>` | Callback to invoke when data is filtered. |
| `onNodeExpand` | `EventEmitter<TreeTableNodeExpandEvent>` | Callback to invoke when a node is expanded. |
| `onNodeCollapse` | `EventEmitter<TreeTableNodeCollapseEvent>` | Callback to invoke when a node is collapsed. |
| `onPage` | `EventEmitter<TreeTablePaginatorState>` | Callback to invoke when pagination occurs. |
| `onSort` | `EventEmitter<any>` | Callback to invoke when a column gets sorted. |
| `onLazyLoad` | `EventEmitter<TreeTableLazyLoadEvent>` | Callback to invoke when paging, sorting or filtering happens in lazy mode. |
| `sortFunction` | `EventEmitter<TreeTableSortEvent>` | An event emitter to invoke on custom sorting, refer to sorting section for details. |
| `onColResize` | `EventEmitter<TreeTableColResizeEvent>` | Callback to invoke when a column is resized. |
| `onColReorder` | `EventEmitter<TreeTableColumnReorderEvent>` | Callback to invoke when a column is reordered. |
| `onNodeSelect` | `EventEmitter<TreeTableNode>` | Callback to invoke when a node is selected. |
| `onNodeUnselect` | `EventEmitter<TreeTableNodeUnSelectEvent>` | Callback to invoke when a node is unselected. |
| `onContextMenuSelect` | `EventEmitter<TreeTableContextMenuSelectEvent>` | Callback to invoke when a node is selected with right click. |
| `onHeaderCheckboxToggle` | `EventEmitter<TreeTableHeaderCheckboxToggleEvent>` | Callback to invoke when state of header checkbox changes. |
| `onEditInit` | `EventEmitter<TreeTableEditEvent>` | Callback to invoke when a cell switches to edit mode. |
| `onEditComplete` | `EventEmitter<TreeTableEditEvent>` | Callback to invoke when cell edit is completed. |
| `onEditCancel` | `EventEmitter<TreeTableEditEvent>` | Callback to invoke when cell edit is cancelled with escape key. |
| `selectionKeysChange` | `EventEmitter<any>` | Callback to invoke when selectionKeys are changed. |

| Slot | Read as | Description |
| --- | --- | --- |
| `<ng-template #colgroup>` | `_colGroupTemplate` |  |
| `<ng-template #caption>` | `_captionTemplate` |  |
| `<ng-template #header>` | `_headerTemplate` |  |
| `<ng-template #body>` | `_bodyTemplate` |  |
| `<ng-template #footer>` | `_footerTemplate` |  |
| `<ng-template #summary>` | `_summaryTemplate` |  |
| `<ng-template #emptymessage>` | `_emptyMessageTemplate` |  |
| `<ng-template #paginatorleft>` | `_paginatorLeftTemplate` |  |
| `<ng-template #paginatorright>` | `_paginatorRightTemplate` |  |
| `<ng-template #paginatordropdownitem>` | `_paginatorDropdownItemTemplate` |  |
| `<ng-template #frozenheader>` | `_frozenHeaderTemplate` |  |
| `<ng-template #frozenbody>` | `_frozenBodyTemplate` |  |
| `<ng-template #frozenfooter>` | `_frozenFooterTemplate` |  |
| `<ng-template #frozencolgroup>` | `_frozenColGroupTemplate` |  |
| `<ng-template #loadingicon>` | `_loadingIconTemplate` |  |
| `<ng-template #reorderindicatorupicon>` | `_reorderIndicatorUpIconTemplate` |  |
| `<ng-template #reorderindicatordownicon>` | `_reorderIndicatorDownIconTemplate` |  |
| `<ng-template #sorticon>` | `_sortIconTemplate` |  |
| `<ng-template #checkboxicon>` | `_checkboxIconTemplate` |  |
| `<ng-template #headercheckboxicon>` | `_headerCheckboxIconTemplate` |  |
| `<ng-template #togglericon>` | `_togglerIconTemplate` |  |
| `<ng-template #paginatorfirstpagelinkicon>` | `_paginatorFirstPageLinkIconTemplate` |  |
| `<ng-template #paginatorlastpagelinkicon>` | `_paginatorLastPageLinkIconTemplate` |  |
| `<ng-template #paginatorpreviouspagelinkicon>` | `_paginatorPreviousPageLinkIconTemplate` |  |
| `<ng-template #paginatornextpagelinkicon>` | `_paginatorNextPageLinkIconTemplate` |  |
| `<ng-template #loader>` | `_loaderTemplate` |  |

## TTBody

`[aglTreeTableBody]` — component

Inherits every input, output and slot of `BaseComponent` — see [basecomponent.md](basecomponent.md).

| Input | Type | Default | Description |
| --- | --- | --- | --- |
| `aglTreeTableBody` | `any[] \| undefined` | _not documented_ |  _(property `columns`)_ |
| `aglTreeTableBodyTemplate` | `Nullable<TemplateRef<any>>` | _not documented_ |  _(property `template`)_ |
| `frozen` | `boolean \| undefined` | _not documented_ |  |
| `serializedNodes` | `any` | _not documented_ |  |
| `scrollerOptions` | `any` | _not documented_ |  |

## TTScrollableView

`[ttScrollableView]` — component

Inherits every input, output and slot of `BaseComponent` — see [basecomponent.md](basecomponent.md).

| Input | Type | Default | Description |
| --- | --- | --- | --- |
| `ttScrollableView` | `any[] \| undefined` | _not documented_ |  _(property `columns`)_ |
| `frozen` | `boolean \| undefined` | _not documented_ |  |
| `scrollHeight` | `string \| undefined \| null` | _not documented_ |  |

## TTSortableColumn

`[ttSortableColumn]` — directive

Inherits every input, output and slot of `BaseComponent` — see [basecomponent.md](basecomponent.md).

| Input | Type | Default | Description |
| --- | --- | --- | --- |
| `ttSortableColumn` | `string \| undefined` | _not documented_ |  _(property `field`)_ |
| `ttSortableColumnDisabled` | `boolean \| undefined` | _not documented_ |  |

## TTSortIcon

`agl-treeTableSortIcon, agl-treetable-sort-icon, agl-tree-table-sort-icon` — component

Inherits every input, output and slot of `BaseComponent` — see [basecomponent.md](basecomponent.md).

| Input | Type | Default | Description |
| --- | --- | --- | --- |
| `field` | `string \| undefined` | _not documented_ |  |
| `ariaLabelDesc` | `string \| undefined` | _not documented_ |  |
| `ariaLabelAsc` | `string \| undefined` | _not documented_ |  |

## TTResizableColumn

`[ttResizableColumn]` — directive

Inherits every input, output and slot of `BaseComponent` — see [basecomponent.md](basecomponent.md).

| Input | Type | Default | Description |
| --- | --- | --- | --- |
| `ttResizableColumnDisabled` | `boolean \| undefined` | _not documented_ |  |

## TTReorderableColumn

`[ttReorderableColumn]` — directive

Inherits every input, output and slot of `BaseComponent` — see [basecomponent.md](basecomponent.md).

| Input | Type | Default | Description |
| --- | --- | --- | --- |
| `ttReorderableColumnDisabled` | `boolean \| undefined` | _not documented_ |  |

## TTSelectableRow

`[ttSelectableRow]` — directive

Inherits every input, output and slot of `BaseComponent` — see [basecomponent.md](basecomponent.md).

| Input | Type | Default | Description |
| --- | --- | --- | --- |
| `ttSelectableRow` | `any` | _not documented_ |  _(property `rowNode`)_ |
| `ttSelectableRowDisabled` | `boolean \| undefined` | _not documented_ |  |

## TTSelectableRowDblClick

`[ttSelectableRowDblClick]` — directive

Inherits every input, output and slot of `BaseComponent` — see [basecomponent.md](basecomponent.md).

| Input | Type | Default | Description |
| --- | --- | --- | --- |
| `ttSelectableRowDblClick` | `any` | _not documented_ |  _(property `rowNode`)_ |
| `ttSelectableRowDisabled` | `boolean \| undefined` | _not documented_ |  |

## TTContextMenuRow

`[ttContextMenuRow]` — directive

Inherits every input, output and slot of `BaseComponent` — see [basecomponent.md](basecomponent.md).

| Input | Type | Default | Description |
| --- | --- | --- | --- |
| `ttContextMenuRow` | `any \| undefined` | _not documented_ |  _(property `rowNode`)_ |
| `ttContextMenuRowDisabled` | `boolean \| undefined` | _not documented_ |  |

## TTCheckbox

`agl-treeTableCheckbox, agl-treetable-checkbox, agl-tree-table-checkbox` — component

Inherits every input, output and slot of `BaseComponent` — see [basecomponent.md](basecomponent.md).

| Input | Type | Default | Description |
| --- | --- | --- | --- |
| `disabled` | `boolean \| undefined` | _not documented_ |  |
| `value` | `any` | _not documented_ |  _(property `rowNode`)_ |

## TTHeaderCheckbox

`agl-treeTableHeaderCheckbox` — component

Inherits every input, output and slot of `BaseComponent` — see [basecomponent.md](basecomponent.md).

## TTEditableColumn

`[ttEditableColumn]` — directive

Inherits every input, output and slot of `BaseComponent` — see [basecomponent.md](basecomponent.md).

| Input | Type | Default | Description |
| --- | --- | --- | --- |
| `ttEditableColumn` | `any` | _not documented_ |  _(property `data`)_ |
| `ttEditableColumnField` | `any` | _not documented_ |  _(property `field`)_ |
| `ttEditableColumnDisabled` | `boolean \| undefined` | _not documented_ |  |

## TreeTableCellEditor

`agl-treeTableCellEditor, agl-treetablecelleditor, agl-treetable-cell-editor` — component

Inherits every input, output and slot of `BaseComponent` — see [basecomponent.md](basecomponent.md).

| Slot | Read as | Description |
| --- | --- | --- |
| `<ng-template #input>` | `inputTemplate` | Editing state of the cell. |
| `<ng-template #output>` | `outputTemplate` | Display state of the cell. |

## TTRow

`[ttRow]` — directive

Inherits every input, output and slot of `BaseComponent` — see [basecomponent.md](basecomponent.md).

| Input | Type | Default | Description |
| --- | --- | --- | --- |
| `ttRow` | `any` | _not documented_ |  _(property `rowNode`)_ |

## TreeTableToggler

`agl-treeTableToggler, agl-treetabletoggler, agl-treetable-toggler` — component

Inherits every input, output and slot of `BaseComponent` — see [basecomponent.md](basecomponent.md).

| Input | Type | Default | Description |
| --- | --- | --- | --- |
| `rowNode` | `any` | _not documented_ |  |
