Skip to content

[Tree] Node highlight colors #2724

Answered by qwadrox
DKPlugins asked this question in PrimeReact
Sep 20, 2024 · 1 comments · 3 replies
Discussion options

You must be logged in to vote

I see. Then you can apply inline styles or classes on the treeNode itself, as I said. When the selection changes, you can update the node array. I don't know exactly how the highlights or background colors should be on the different deps according to your requirements, but here is a sample, and you can play with it further:
https://stackblitz.com/edit/ymebpg?file=src%2FApp.jsx

Another way you might be able to achieve this is using the nodeTemplate:
There is an example in the documentation how to use templating: https://primereact.org/tree/#template

Here is another solution made by me using templating:
https://stackblitz.com/edit/c127qh?file=src%2Findex.css

For most scenarios, especially …

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@DKPlugins
Comment options

@qwadrox
Comment options

Answer selected by DKPlugins
@DKPlugins
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants