+ Start a Discussion

LWC - lightning-datatable - Row selection is not maintained between pages

Dear All,

My requirement is to allow user to select multiple records and update  a flag (Is_Cancenlled__c) in backend. This includes pagination as well. 

I am facing below issues, while performing this in LWC. 

a. Row selection across the pages is not perisistent. While I navigate to next or previous page, the selection from earlier pages are lost.
b. While i debugged the issue, I found out that the rowselection method is getting fired even in pagination. Any one can explain the behaviour please?

Sample LWC code for this purpose would be a great help