Collapsing tree nodes when clicked.