# Class TreeComponent<Data>

#### Type Parameters

- Data extends WithIdentifier & WithChildren = any

#### Implements

- OnInit
- AfterContentInit

- Defined in tree/src/lib/tree.component.ts:91

#####
Index

### Constructors

constructor

### Properties

_moveDivider
_treeContainerWidth
cdr
content?
contentEditableMethod?
dataSource
details
dividerOffset
elementRef
getIcon?
getStyle?
getType?
hasDetails?
hideLeafIcon
id?
multiple
portal
renderer
searchForm
showTreeNavigation
toDisplay?
treeContainer
treeControl
viewContainerRef

### Accessors

cacheId
nodeDisplayEditable

### Methods

getLevel
hasChild
isExpandable
ngAfterContentInit
ngOnInit
onContentEditableChange
onMousedown
onMousemove
onMouseup
openDetails
setDividerOffset
toggleTreeNavigation

## Constructors

### constructor

- new TreeComponent<Data>(viewContainerRef, cdr, contentEditableMethod, renderer, elementRef, searchForm): TreeComponent<Data>

- #### Type Parameters

  - Data extends unknown = any

  #### Parameters

  - viewContainerRef: ViewContainerRef
  - cdr: ChangeDetectorRef
  - contentEditableMethod: null | Method<any, null | string>
  - renderer: Renderer2
  - elementRef: ElementRef<HTMLElement>
  - searchForm: null | SearchForm<unknown>

  #### Returns TreeComponent<Data>

  - Defined in tree/src/lib/tree.component.ts:139

## Properties

### `Private` _moveDivider

_moveDivider: boolean = false

Indicates that the divider is moved with mouse down

- Defined in tree/src/lib/tree.component.ts:130

### `Private` _treeContainerWidth

_treeContainerWidth: null | number = null

Holds the current tree container width. If null the move divider feature was not yet used and the initial container width is not calculated

- Defined in tree/src/lib/tree.component.ts:137

### `Private` `Readonly` cdr

cdr: ChangeDetectorRef

- Defined in tree/src/lib/tree.component.ts:143

### `Optional` content

content?: TreeContentDirective

- Defined in tree/src/lib/tree.component.ts:111

### `Optional` contentEditableMethod

contentEditableMethod?: null | Method<any, null | string>

- Defined in tree/src/lib/tree.component.ts:97

### dataSource

dataSource: TreeDataSource<Data, any, any>

- Defined in tree/src/lib/tree.component.ts:95

### details

details: EventEmitter<any> = ...

- Defined in tree/src/lib/tree.component.ts:117

### dividerOffset

dividerOffset: string = '256px'

- Defined in tree/src/lib/tree.component.ts:119

### `Private` `Readonly` elementRef

elementRef: ElementRef<HTMLElement>

- Defined in tree/src/lib/tree.component.ts:148

### `Optional` getIcon

getIcon?: NodeGetIconFunction<any>

- Defined in tree/src/lib/tree.component.ts:101

### `Optional` getStyle

getStyle?: NodeGetStyleFunction<any>

- Defined in tree/src/lib/tree.component.ts:105

### `Optional` getType

getType?: NodeGetTypeFunction<any>

- Defined in tree/src/lib/tree.component.ts:103

### `Optional` hasDetails

hasDetails?: NodeHasDetailsFunction<any>

- Defined in tree/src/lib/tree.component.ts:109

### hideLeafIcon

hideLeafIcon: boolean = false

- Defined in tree/src/lib/tree.component.ts:113

### `Optional` id

id?: string

- Defined in tree/src/lib/tree.component.ts:115

### multiple

multiple: boolean = false

- Defined in tree/src/lib/tree.component.ts:107

### portal

portal: null | TemplatePortal<any> = null

- Defined in tree/src/lib/tree.component.ts:120

### `Private` `Readonly` renderer

renderer: Renderer2

- Defined in tree/src/lib/tree.component.ts:147

### `Readonly` searchForm

searchForm: null | SearchForm<unknown>

- Defined in tree/src/lib/tree.component.ts:151

### `Readonly` showTreeNavigation

showTreeNavigation: WritableSignal<boolean> = ...

- Defined in tree/src/lib/tree.component.ts:124

### `Optional` toDisplay

toDisplay?: NodeToDisplayFunction<any>

- Defined in tree/src/lib/tree.component.ts:99

### treeContainer

treeContainer: ElementRef<any>

- Defined in tree/src/lib/tree.component.ts:122

### treeControl

treeControl: FlatTreeControl<Node<Data, any>, Node<Data, any>>

- Defined in tree/src/lib/tree.component.ts:93

### `Private` `Readonly` viewContainerRef

viewContainerRef: ViewContainerRef

- Defined in tree/src/lib/tree.component.ts:141

## Accessors

### cacheId

- get cacheId(): string

- #### Returns string

  - Defined in tree/src/lib/tree.component.ts:161

### nodeDisplayEditable

- get nodeDisplayEditable(): boolean

- #### Returns boolean

  - Defined in tree/src/lib/tree.component.ts:157

## Methods

### getLevel

- getLevel(node): number

- #### Parameters

  - node: Node<Data, any>

  #### Returns number

  - Defined in tree/src/lib/tree.component.ts:165

### hasChild

- hasChild(_, nodeData): boolean

- #### Parameters

  - _: number
  - nodeData: Node<Data, any>

  #### Returns boolean

  - Defined in tree/src/lib/tree.component.ts:169

### isExpandable

- isExpandable(node): boolean

- #### Parameters

  - node: Node<Data, any>

  #### Returns boolean

  - Defined in tree/src/lib/tree.component.ts:167

### ngAfterContentInit

- ngAfterContentInit(): void

- #### Returns void

  Implementation of AfterContentInit.ngAfterContentInit

  - Defined in tree/src/lib/tree.component.ts:195

### ngOnInit

- ngOnInit(): void

- #### Returns void

  Implementation of OnInit.ngOnInit

  - Defined in tree/src/lib/tree.component.ts:171

### onContentEditableChange

- onContentEditableChange(value, node): any

- #### Parameters

  - value: null | string
  - node: Node<Data, any>

  #### Returns any

  - Defined in tree/src/lib/tree.component.ts:221

### onMousedown

- onMousedown(): void

- #### Returns void

  - Defined in tree/src/lib/tree.component.ts:226

### onMousemove

- onMousemove($event): void

- #### Parameters

  - $event: MouseEvent

  #### Returns void

  - Defined in tree/src/lib/tree.component.ts:236

### onMouseup

- onMouseup(): void

- #### Returns void

  - Defined in tree/src/lib/tree.component.ts:231

### openDetails

- openDetails(node): void

- #### Parameters

  - node: Node<Data, any>

  #### Returns void

  - Defined in tree/src/lib/tree.component.ts:206

### `Private` setDividerOffset

- setDividerOffset(offset): void

- #### Parameters

  - offset: string

  #### Returns void

  - Defined in tree/src/lib/tree.component.ts:254

### toggleTreeNavigation

- toggleTreeNavigation(): void

- #### Returns void

  - Defined in tree/src/lib/tree.component.ts:250