Keeping the selected row in a powertable?

I have a power table with data binded to an expression returning a source dataset.
User can select only one row.
When new data are added or dateted in the source dataset, I would like to keep the row selected by the user (in the case the row is still in the source dataset)
each time a row is added in the source dataset, this row is selected bu default, and user row selection is lost.
Any idea to achieve that ?

I don’t fully understand what you are asking, but maybe you could add a custom property that points to the rowIndex that the user last selected. I guess you could put the script in onMousePress extension function. Something like

self.customProperty = rowIndex