hide the submenus when shrink