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

Tree: Custom icon assignation is not working #6116

Closed
VentuzVictorPerez opened this issue Mar 8, 2024 · 1 comment · Fixed by #6118
Closed

Tree: Custom icon assignation is not working #6116

VentuzVictorPerez opened this issue Mar 8, 2024 · 1 comment · Fixed by #6118
Assignees
Labels
Type: Bug Issue contains a defect related to a specific component.
Milestone

Comments

@VentuzVictorPerez
Copy link

Describe the bug

As stated here you can use custom icons (svg markup) in prime react components.

However that is not the case for the Tree component (see the forked demo).

The "Documents" tree node is not rendering any icon when using svg (but the others do).

Reproducer

https://stackblitz.com/edit/ztgw27-fbci8r?file=src%2Fservice%2FNodeService.jsx

PrimeReact version

9.6.3

React version

18.x

Language

TypeScript

Build / Runtime

Create React App (CRA)

Browser(s)

No response

Steps to reproduce the behavior

Just see the forked demo.

Expected behavior

Tree must work with custom icons as other components do.

@VentuzVictorPerez VentuzVictorPerez added the Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible label Mar 8, 2024
@melloware melloware self-assigned this Mar 8, 2024
@melloware melloware added Type: Bug Issue contains a defect related to a specific component. and removed Status: Needs Triage Issue will be reviewed by Core Team and a relevant label will be added as soon as possible labels Mar 8, 2024
@melloware melloware added this to the 10.5.2 milestone Mar 8, 2024
melloware added a commit to melloware/primereact that referenced this issue Mar 8, 2024
@melloware
Copy link
Member

Great reproducer! PR submitted.

nitrogenous added a commit that referenced this issue Mar 14, 2024
Fix #6116: Tree allow custom node icons
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Issue contains a defect related to a specific component.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants