If the cliked tab is already expanded, simply collapse all panels