function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Timmy AhluwaliaTimmy Ahluwalia 

Lightning DataTable

I am updating the datatable rows in lightning by selecting the selectedRows() .
when I am reloading the datatable the check box, SELECTION is still checked.
How do I get the selection to be false.
Khan AnasKhan Anas (Salesforce Developers) 
Hi Timmy,

Greetings to you!

Please refer to the below links which might help you further with the above requirement.

I hope it helps you.

Kindly let me know if it helps you and close your query by marking it as solved so that it can help others in the future. It will help to keep this community clean.

Thanks and Regards,
Khan Anas
Timmy AhluwaliaTimmy Ahluwalia
Hi Anes,
I tried all the methods mentioned in both the links but no success.
Still trying to find the answer.
if there is any more information you can provide it will be appreciated.
Priya GovindasamyPriya Govindasamy
assign v.selectedRows to empty list.
var deselect = [ ];
component.set("v.selectedRows", deselect);
Timmy AhluwaliaTimmy Ahluwalia
Thanks for the answers, the problem is that when I call the datatable from the classic the selection does not go.
You can refer below code
updateSelectedRow: function (cmp, event) {
        var selectedRows = event.getParam('selectedRows');
        cmp.set('v.selectedRowsCount', selectedRows.length);
        cmp.set('v.selectedData', selectedRows);
        console.log( cmp.get('v.selectedData') );

You can find ready to use lightning data table component example here: