# Class TreeComponent<Data>

#### Type Parameters

- Data extends WithIdentifier & WithChildren = any

#### Implements

- OnInit
- AfterContentInit

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

#####
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: Method<any, string>
  - renderer: Renderer2
  - elementRef: ElementRef<HTMLElement>
  - searchForm: SearchForm<unknown>

  #### Returns TreeComponent<Data>

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

## Properties

### `Private` _moveDivider

_moveDivider: boolean = false

Indicates that the divider is moved with mouse down

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

### `Private` _treeContainerWidth

_treeContainerWidth: 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:120

### `Private` `Readonly` cdr

cdr: ChangeDetectorRef

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

### `Optional` content

content?: TreeContentDirective

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

### `Optional` contentEditableMethod

contentEditableMethod?: Method<any, string>

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

### dataSource

dataSource: TreeDataSource<Data, any, any>

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

### details

details: EventEmitter<any> = ...

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

### dividerOffset

dividerOffset: string = '256px'

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

### `Private` `Readonly` elementRef

elementRef: ElementRef<HTMLElement>

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

### `Optional` getIcon

getIcon?: NodeGetIconFunction<any>

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

### `Optional` getStyle

getStyle?: NodeGetStyleFunction<any>

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

### `Optional` getType

getType?: NodeGetTypeFunction<any>

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

### `Optional` hasDetails

hasDetails?: NodeHasDetailsFunction<any>

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

### hideLeafIcon

hideLeafIcon: boolean = false

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

### `Optional` id

id?: string

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

### multiple

multiple: boolean = false

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

### portal

portal: TemplatePortal<any> = null

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

### `Private` `Readonly` renderer

renderer: Renderer2

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

### `Readonly` searchForm

searchForm: SearchForm<unknown>

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

### `Readonly` showTreeNavigation

showTreeNavigation: WritableSignal<boolean> = ...

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

### `Optional` toDisplay

toDisplay?: NodeToDisplayFunction<any>

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

### treeContainer

treeContainer: ElementRef<any>

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

### treeControl

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

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

### `Private` `Readonly` viewContainerRef

viewContainerRef: ViewContainerRef

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

## Accessors

### cacheId

- get cacheId(): string

- #### Returns string

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

### nodeDisplayEditable

- get nodeDisplayEditable(): boolean

- #### Returns boolean

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

## Methods

### getLevel

- getLevel(node): number

- #### Parameters

  - node: Node<Data, any>

  #### Returns number

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

### hasChild

- hasChild(_, nodeData): boolean

- #### Parameters

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

  #### Returns boolean

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

### isExpandable

- isExpandable(node): boolean

- #### Parameters

  - node: Node<Data, any>

  #### Returns boolean

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

### ngAfterContentInit

- ngAfterContentInit(): void

- #### Returns void

  Implementation of AfterContentInit.ngAfterContentInit

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

### ngOnInit

- ngOnInit(): void

- #### Returns void

  Implementation of OnInit.ngOnInit

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

### onContentEditableChange

- onContentEditableChange(value, node): any

- #### Parameters

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

  #### Returns any

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

### onMousedown

- onMousedown(): void

- #### Returns void

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

### onMousemove

- onMousemove($event): void

- #### Parameters

  - $event: MouseEvent

  #### Returns void

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

### onMouseup

- onMouseup(): void

- #### Returns void

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

### openDetails

- openDetails(node): void

- #### Parameters

  - node: Node<Data, any>

  #### Returns void

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

### `Private` setDividerOffset

- setDividerOffset(offset): void

- #### Parameters

  - offset: string

  #### Returns void

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

### toggleTreeNavigation

- toggleTreeNavigation(): void

- #### Returns void

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