Skip to content
Snippets Groups Projects
Commit 8eee8a00 authored by Xiao Gui's avatar Xiao Gui Committed by xgui3783
Browse files

bugfix: handles when no flatTreeviewPort was provided

parent e298fdb6
No related branches found
No related tags found
No related merge requests found
......@@ -48,6 +48,13 @@ export class FlatTreeComponent implements AfterViewChecked, AfterViewInit, OnDes
}
}
ngOnInit(){
if(this.flatTreeViewPort){
this.clusterNumber = 50
}
}
ngAfterViewInit(){
if(this.flatTreeViewPort){
......@@ -106,6 +113,7 @@ export class FlatTreeComponent implements AfterViewChecked, AfterViewInit, OnDes
}
private _currentPos : number = 0
public clusterNumber : number = Number.POSITIVE_INFINITY
showCluster(index:number){
return index <= this._currentPos + 1
......
<div class="container">
<div *ngFor = "let flattenedItems of (inputItem | flattenTreePipe : findChildren | filterRowsByVisbilityPipe : findChildren : searchFilter | appendSiblingFlagPipe | clusteringPipe : 50 ); let index = index" clusterContainer>
<div *ngFor = "let flattenedItems of (inputItem | flattenTreePipe : findChildren | filterRowsByVisbilityPipe : findChildren : searchFilter | appendSiblingFlagPipe | clusteringPipe : clusterNumber ); let index = index" clusterContainer>
<div [attr.clusterindex] = "index" flatTreeStart #flatTreeStart>
</div>
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment