Need a way to hide a leaf node in the tree component

There needs to be a way to hide a leaf node. If would be helpful it there was a class assigned to the leaf node HTML so that one only needs to use CSS to hide the leaf node.

Thank you for your suggestion.
It will be sent to the dev team.