Table row selected state after refresh

Is there a known issue with the selected row of a table not working after a refresh? My scenario is as follows:

I have a table populated from an array that I have created in code. I select a row. I then perform another action which causes the table to be re-populated with different data. However, the row that I had previously selected is still in a selected state. I’ve tried using the refresh() method, which works in ‘preview’, but once published it doesn’t work?