diff --git a/src/app/showcase/components/tree/treedemo.html b/src/app/showcase/components/tree/treedemo.html index a495c5abf5b..5d70db7c6a3 100644 --- a/src/app/showcase/components/tree/treedemo.html +++ b/src/app/showcase/components/tree/treedemo.html @@ -331,6 +331,18 @@
Icons

Icon of a treenode is defined using the icon property, if you need an icon depending on the expand or collapse state, use expandedIcon and collapsedIcon instead.

+
Sections
+

Header and Footers sections can be customized using header and footer templates.

+ +<p-tree [value]="files"> + <ng-template pTemplate="header"> + Header Content + </ng-template> + <ng-template pTemplate="footer"> + Footer Content + </ng-template> +</p-tree> +
Templating

By default label of a treenode is displayed inside a tree node, in case you need to place custom content define a pTemplate that gets the treenode as an implicit variable. Example below places an input field to create editable treenodes.