fix selectedIndex != -1 for container display when all children are removed