Prevent table from refreshing

Hi all, I’m allowing a user to delete a table row by simply clicking on it. If I use the code below, the whole table refreshes automatically scrolling to the top and losing my selected row. Is there a way of simply deleting the selected row without the whole table refreshing?

let tmp = $w ( “#myTable” ). rows ;
tmp . splice (selectedRowToDelete, 1 );
$w ( “#myTable” ). rows = tmp ;