primeng icon indicating copy to clipboard operation
primeng copied to clipboard

TreeSelect: style and type attribute of TreeNode API doesn't work

Open mortezabahrami opened this issue 3 years ago • 2 comments

Describe the bug

While using TreeSelect, the style and type attributes of TreeNode don't work.

I have this in my HTML template: <p-treeSelect > <ng-template let-node pTemplate="temp"> TEMP ITEM </ng-template> </p-treeSelect>

and these attributes on each item: "type": "temp", "style": "color:red;",

and also this is stack blitz sample.

It would be great if anyone can suggest me a workaround for this.

Environment

Primeng 13.4.1

Reproducer

https://stackblitz.com/edit/primeng-treeselect-demo-2a1e1f?file=src/app/app.component.html

Angular version

13.3.2

PrimeNG version

13.4.1

Build / Runtime

Angular CLI App

Language

TypeScript

Node version (for AoT issues node --version)

16.16.0

Browser(s)

No response

Steps to reproduce the behavior

No response

Expected behavior

No response

mortezabahrami avatar Jul 30 '22 11:07 mortezabahrami

I should mention that the "style" attribute neither doesn't work on the Tree component. Like in this link.

mortezabahrami avatar Jul 31 '22 03:07 mortezabahrami

About the type attribute, I've found that the TreeSelect does not pass the templates attribute to the Tree component.

mortezabahrami avatar Aug 01 '22 05:08 mortezabahrami

Issue still remain, type attribute is not working for tree select (p-treeSelect). Currently there are no way to make node template since type attribute does not work

SHENGALTEC avatar Jul 11 '23 03:07 SHENGALTEC