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
Rahul Rana 32Rahul Rana 32 

checkboxes in lightning:datatable are getting unchecked.

Hi Lightning Experts,

I'm dsplaying my object records in a lightning datatable in checkboxes and pagination. I'm facing below 2 issues:
1. If I'm selecting some checkboxes on a page and moving to another page using pagination, the checked checkboxes are getting unchecked. 
2. I'd like to show all the checked checkboxes first in the datatable and then all the unchecked.(sort by checked checkboxes) after I save the changes.

Kindly suggest the solutions to above questions. Thank you in advance.
Danish HodaDanish Hoda
Hi Rahul,
When you paginate, the data on controller side is overwritten once you come back to the previous page.