Starting off with a demonstration example: Check out this StackBlitz for primeng p-tree.
I am utilizing primeng to construct a structure for polls and answers using p-tree.
The hierarchy is as follows:
Participants --> Polls --> Questions --> Answers
Every question has answer options.
The array of nodes and children is shown below:
"label": "Bollywood",
"children": [
{
"label": "Do you prefer Hollywood? [single]",
"children": [
{
"label": "Yes",
"selected": false
},
{
"label": "No",
"selected": true
}
]
}
]
I have assigned a selected value to each answer option's children so that we can apply CSS to highlight the true values over the others.
See the screenshot below for the current scenario:
https://i.sstatic.net/fEF7e.png
I am seeking help to style the tree nodes in the primeng p-tree control to highlight the options with selected true values. Any assistance in achieving this would be greatly appreciated. Kindly refer to the mentioned StackBlitz example for better understanding. Thank you.