### File

`packages/components/eui-tree-list/eui-tree-list.component.ts`

### Implements

`AfterViewInit` `OnChanges`

### Metadata

encapsulation | `ViewEncapsulation.None`
selector | `eui-tree-list`
imports | `EuiTreeListToolbarComponent` `TranslateModule`
templateUrl | `./eui-tree-list.component.html`
styleUrl | `./eui-tree-list.scss`

### Index

###### Properties
Public ariaOwns Public ariaRoleTree Public classes items Public originalTabindex
###### Methods
Public disableFocus Public focus Public focusOnNextTreeItem Public focusOnPreviousTreeItem onCollapseAll onExpandAll onFilter onFocus Public setExpandedState Public setVisibleState
###### Inputs
ariaLabel collapseAllLabel e2eAttr expandAllLabel filterFunction filterLabel hasItemsUrl isExpanded isShowToolbar isShowToolbarToggle tabindex toolbarFilterValue
###### Outputs
collapseAll expandAll filter itemSelected
###### Accessors
hasExpandAllLabel hasCollapseAllLabel

### Inputs

ariaLabel
Type : `string`
Default value : `''`
Sets the aria-label attribute for the tree list

collapseAllLabel
Type : `string`
Sets the label for the collapse-all button

e2eAttr
Type : `string`
Default value : `'eui-tree-list'`
Sets the end-to-end attribute for the tree list

expandAllLabel
Type : `string`
Sets the label for the expand-all button

filterFunction
Type : `function`
Function to filter the tree list items based on the provided params

filterLabel
Type : `string`
Sets the label for the filter input

hasItemsUrl
Type : `boolean`
Default value : `false`

isExpanded
Type : `boolean`
Default value : `false`
Sets the expanded state of the tree list

isShowToolbar
Type : `boolean`
Default value : `false`
Option to show the toolbar

isShowToolbarToggle
Type : `boolean`
Default value : `true`

tabindex
Type : `string`
Default value : `'0'`
Sets the tabindex attribute to handle the focus state

toolbarFilterValue
Type : `string`
Default value : `''`
Sets the filter value of the toolbar

### Outputs

collapseAll
Type : `EventEmitter`
Event emitted upon collapsing all items.

expandAll
Type : `EventEmitter`
Event emitted upon expanding all items.

filter
Type : `EventEmitter`
Event that emits the filter value upon filtering.

itemSelected
Type : `EventEmitter`

### Methods

Public disableFocus
`disableFocus()`
Method that makes the tree list not focusable. Returns : `void`

Public focus
`focus()`
Method that puts the focus on the first child tree item. Returns : `void`

Public focusOnNextTreeItem
`focusOnNextTreeItem(currentTreeListItem: EuiTreeListItemComponent)`
Method used to focus on the next tree item in the list. Parameters :
Name | Type | Optional | Description
currentTreeListItem | `EuiTreeListItemComponent` | No | The current tree list item.
Returns : `boolean` Returns true if the focus was set on the next tree item, false otherwise.

Public focusOnPreviousTreeItem
`focusOnPreviousTreeItem(currentTreeListItem: EuiTreeListItemComponent)`
Method used to focus on the previous tree item in the list. Parameters :
Name | Type | Optional | Description
currentTreeListItem | `EuiTreeListItemComponent` | No | The current tree list item.
Returns : `boolean` Returns true if the focus was set on the previous tree item, false otherwise.

onCollapseAll
`onCollapseAll(event: Event)`
Method that sets the collapsed state and emits the collapse-all event. Parameters :
Name | Type | Optional
event | `Event` | No
Returns : `void`

onExpandAll
`onExpandAll(event: Event)`
Method that sets the expanded state and emits the expand-all event. Parameters :
Name | Type | Optional
event | `Event` | No
Returns : `void`

onFilter
`onFilter(filterValue: string)`
Method that handles the visibility of the items based on the filter value and emits the filter event. Parameters :
Name | Type | Optional | Description
filterValue | `string` | No | The filter value to set.
Returns : `void`

onFocus
This method is not used anymore and will be removed in the next major version. You can use the `focus()` method instead.
`onFocus()`
Returns : `void`

Public setExpandedState
`setExpandedState(state: boolean)`
Method that sets the expanded state of the tree list items. Parameters :
Name | Type | Optional
state | `boolean` | No
Returns : `void`

Public setVisibleState
`setVisibleState(state: boolean)`
Method that sets the visibility state of the tree list items. Parameters :
Name | Type | Optional
state | `boolean` | No
Returns : `void`

### Properties

Public ariaOwns
Type : `string`
Default value : `''`

Public ariaRoleTree
Type : `string`
Default value : `'tree'`

Public classes
Type : `string`
Default value : `''`

items
Type : `QueryList<EuiTreeListItemComponent>`
Decorators : `@ContentChildren(undefined)`

Public originalTabindex
Type : `string`
Default value : `'0'`

### Accessors

hasExpandAllLabel
get `hasExpandAllLabel()`
Getter function that returns true if the expandAllLabel exists. Returns : `boolean`

hasCollapseAllLabel
get `hasCollapseAllLabel()`
Getter function that returns true if the collapseAllLabel exists. Returns : `boolean`

# results matching ""

# No results matching ""