Hello APEXPERTS,
I am using APEX 19.1. In my page I have a APEX Tree region. Based on my page item value (Ex: P1_SELECTED_NODE), I am setting the "Selected Node Page Item" in the Tree attribute. When my page loads it correctly sets the selected node by highlighting the node background color in GREY (applies some CSS to it). Now my requirement is to make the selected node text to display as BOLD. I achieved this by using below inline CSS on property. (Where my_tree is the static id of my tree region)
/*Bold Current Tree Node*/
#my_tree .is-selected .a-TreeView-label{
font-weight: bold;
}
But the issue is when I hit "Collapse All" button then the Root Node gets Highlighted in BOLD/Grey Background.
I see the similar issue in "Sample Tree" application. For example lets say if any Child node is selected and then if I hit "Collapse All" button then its Parent Node gets highlighted and again if I "Expand All" then my "Selected Node" highlighting is gone. Below images details about the issue.
- My Selected Node using Page Item on Page Load

- On click of "Collapse All", All the nodes get collapsed and tree highlights to parent node.

- On click of "Expand All", the selected node highlighting still stays at parent node instead of my child node.

My requirement is to retain the selected node from Page Item as intact. It should not change on click of "Expand All" or "Collapse All" button.
Is there any way to set the CSS only for the selected node from page item?
Thanks in advance.