Hi,
I'm using the igx-tree for navigation purpose in my project - so far so good. But I'm facing with the situation when I expand a node the related node will be selected - like in the doc www.infragistics.com/.../tree
But this is a behavior that I don't want. My requirement is, that the user can click on the expand/collapse symbol but current selected node should not change.
How can I change this behavior.
THX
Hello,
From your description, it seems like you’re referring to the visual indication (border) around the nodes in the igx-tree component when they are selected. If your goal is to prevent the selected node's appearance from changing when expanding or collapsing other nodes, I recommend using a CSS approach to remove the border.
You can apply the following style to make the border transparent:
igx-tree { --igx-tree-border-color: transparent; }
This will ensure that no border is displayed when a node is clicked, preserving the visual state of the currently selected node even as others are expanded or collapsed.
The described scenario could be observed here:
For a practical demonstration, I’ve created a sample project where this styling is implemented. You can view it here: View Sample.
Please review the sample and let me know if it meets your requirements or if there are any additional customizations you’d like to discuss. I’m happy to help with any further adjustments or questions!
Regards,
Georgi Anastasov
Entry Level Software Developer
Infragistics
Hello Georgi,
Thanks for you quick reply.
Unfortunatally it is not only the visual indication of the border. When I expand/collapse the node I also receive the "activeNodeChanged" event which leads to corresponding actions being carried out.
However, this is exactly what I don't want if the user only wants to expand/collapse the node.
The action shall be performed only if the node was clicked/selected but not if the node will only expand/collapse by the user (click on the expand/collapse symbol)
Hazim