title: primeng datatable paging loses selections on server side paging
body: <pre><code>&lt;p-dataTable #dt [value]="tabListItem" [rowStyleMap]="styleMap" [responsive]="true" (onLazyLoad)="paginate($event)" [headerCheckboxToggleAllPages]="false"
    [resizableColumns]="false" [rows]="numberOfRows" [pageLinks]="pageLinks" [paginator]="false" [sortOrder]="1" selectionMode="'multiple'" (onRowUnselect)="handleRowUnSelect($event)"
    [(selection)]="selectedRows" (onPage)="paginate($event)" [lazy]="true" [totalRecords]="totalListCount" (onRowSelect)="handleRowSelect($event)" [rowStyleClass]="lookupRowStyleClass"&gt;
    &lt;p-column field="" header="" [style]="{'width':'3%'}" [styleClass]="'text-center'" selectionMode="multiple"&gt;
        &lt;p-checkbox name="groupname" binary="true" (onChange)="selectRow($event,this,car)"&gt;
        &lt;/p-checkbox&gt;
        &lt;input type="checkbox" class="check-box" [ngModel]="checkboxValue" (ngModelChange)="selectRow($event,this,car)"&gt;
    &lt;/p-column&gt;
    &lt;p-column *ngFor="let data of tableHeaders" field="{{data.fieldNam}}" [sortable]="false" header="{{data.header}}" [style]="{'width':data.style.width}"&gt;
  
      &lt;ng-template let-col let-dep="rowData" pTemplate="body"&gt;
        &lt;span title="{{dep[data.fieldNam]}}"&gt;{{dep[data.fieldNam]}}&lt;/span&gt;
      &lt;/ng-template&gt;
    &lt;/p-column&gt;
  
  
  &lt;/p-dataTable&gt;
  </code></pre>
  
  <p>My lazy loaded dataTable seems to work perfectly with checkboxes for multiple selections. When I click on another page, it delivers the selected rows in the array exactly as I think it should, and I have a correct array that holds those selections in the bean. I can then click on more checkboxes on that page and select additional rows with no problem.</p>
  
  <p>Here is where my question comes in: When I go back to the previous page and it is displayed, I was expecting to see the rows I selected to STILL be selected and highlighted but they are not. When I look in the selectedRows array to see the contents of the selection array I understand why because I see that it only holds the selections from the 2nd page and no row keys on this first page match.</p>
  
  <p>It appears to me (given I am doing everything correctly) that select multiple only delivers the selected rows for the rows on the currently displayed page of data and then it renders the new page of data - and nothing shows as selected because the selection array only contains rows that do not match the currently displayed data.</p>
  
  <p>How can this be fixed</p>