Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
mortezabahrami opened this issue Jul 30, 2022 · 3 comments
Closed
Assignees
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Milestone

Comments

@mortezabahrami
Copy link

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 mortezabahrami added the Type: Bug Issue contains a bug related to a specific component. Something about the component is not working label Jul 30, 2022
@mortezabahrami
Copy link
Author

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

@mortezabahrami
Copy link
Author

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

mortezabahrami pushed a commit to mortezabahrami/primeng that referenced this issue Aug 1, 2022
I've added parentTemplates attribute to the Tree, and added a templateMap to the TreeSelect to identify required types to pass to the Tree.
@cetincakiroglu cetincakiroglu self-assigned this Aug 8, 2022
@cetincakiroglu cetincakiroglu added this to the 14.Future milestone Aug 8, 2022
@cetincakiroglu cetincakiroglu modified the milestones: 14.Future, 14.0.2 Aug 24, 2022
cetincakiroglu added a commit that referenced this issue Aug 24, 2022
Fixed #11761 - TreeSelect | style and type attribute of TreeNode API …
@SHENGALTEC
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a bug related to a specific component. Something about the component is not working
Projects
None yet
Development

No branches or pull requests

3 participants