clearing selection in table, cleaning table when removed all elements