diff --git a/src/app/components/tree/tree.ts b/src/app/components/tree/tree.ts index ddb938e5497..8a21610b36b 100755 --- a/src/app/components/tree/tree.ts +++ b/src/app/components/tree/tree.ts @@ -517,6 +517,7 @@ export class UITreeNode implements OnInit {
+
@@ -539,8 +540,10 @@ export class UITreeNode implements OnInit {
{{emptyMessage}}
+
+
@@ -548,6 +551,7 @@ export class UITreeNode implements OnInit {
{{emptyMessage}}
+
`, changeDetection: ChangeDetectionStrategy.Default, @@ -642,6 +646,10 @@ export class Tree implements OnInit,AfterContentInit,OnChanges,OnDestroy,Blockab serializedValue: any[]; + headerTemplate: TemplateRef; + + footerTemplate: TemplateRef; + public templateMap: any; public nodeTouched: boolean; @@ -709,7 +717,19 @@ export class Tree implements OnInit,AfterContentInit,OnChanges,OnDestroy,Blockab } this.templates.forEach((item) => { - this.templateMap[item.name] = item.template; + switch (item.getType()) { + case 'header': + this.headerTemplate = item.template; + break; + + case 'footer': + this.footerTemplate = item.template; + break; + + default: + this.templateMap[item.name] = item.template; + break; + } }); }