Hide children of menu items when text is collapsed