Deselect all table rows

How do I deselect all rows in a simple table element. I’m allowing a user to click on a row to select it, then delete it, but then that blank row stays selected. How can I either deselect that row or redraw the table with no rows selected?