How to remove all the selected rows from a table?

I have a table that gets data from 2 APIs and depending on which search button a user has clicked it'll display the data. Like this:

i will also be pausing the selected rows by making a query in the backend.

My issue is: when they click "search source" and select a row and then click the different search button ("search tables") it is still having the row from previous data still selected.

What should i do to make all the rows unselected if the data in the table is refreshed?

use the event handler to Control component and then select your table as the component and then select Method Select row and leave the Index blank
Screenshot 2022-12-16 at 8.37.01 AM

is there a way to write it in javascript? .

this worked! thank you so much