title: sorting is not working perfectly in primeNG tables. Showing uneven data when in sorting mode?
body: <p>I have used primeNG tables for pagination but while trying to implement sorting for each field in table row. its showing uneven data for 1,2,3,4,5,6 to 14. when i click on sort(increasing order) its displaying 1,10, 11,12,13,14,2,3,4,5,6,7,8,9. </p>
  
  <pre><code> **.html file**
     &lt;p-table [value]="incomingbookings" [columns]="cols" #iwdtable [paginator]="true" [rows]="5"  [pageLinks]="1" [(selection)]="selectedIncomingBookings" dataKey="booking_id" [responsive]="true"&gt;
                  &lt;ng-template pTemplate="header" let-columns&gt;
                      &lt;tr&gt;
                          &lt;th *ngFor="let col of columns" [pSortableColumn]="col.field"&gt;
                              {{col.header}}
                              &lt;p-sortIcon [field]="col.field"&gt;&lt;/p-sortIcon&gt;
                          &lt;/th&gt;
                          &lt;th&gt;Add to offer&lt;/th&gt;
                          &lt;th&gt;Action&lt;/th&gt;
                      &lt;/tr&gt;
                  &lt;/ng-template&gt;
                  &lt;ng-template pTemplate="body" let-rowData let-incomingbookings &gt;
                      &lt;tr [pSelectableRow]="rowData"&gt;
                          &lt;td field="offer_id"&gt;
                              &lt;span class="ui-column-title" field="offer_id"&gt;Offer Id&lt;/span&gt;
                              {{incomingbookings.offer_id}}
                          &lt;/td&gt;
                          &lt;td field="booking_id"&gt;
                              &lt;span class="ui-column-title"&gt;Bookign Id&lt;/span&gt;
                              {{incomingbookings.booking_id}}
                          &lt;/td&gt;
                          &lt;td field="ratings" style="padding-right:0px;padding-left:0px;"&gt;
                              &lt;span class="ui-column-title"&gt;Shipper&lt;/span&gt;
                              {{incomingbookings.shipper_info[0].name}}
                              &lt;div&gt;
                                  &lt;!-- &lt;span class="fs10"&gt;{{incomingbookings.shipper_info[0].ratings}}&lt;/span&gt; --&gt;
                                  &lt;span class="stars-container stars-{{getvalue(incomingbookings.shipper_info[0].ratings)}}"&gt;★★★★★&lt;/span&gt;
                              &lt;/div&gt;
                          &lt;/td&gt;
                          &lt;td field="pcs" &gt;
                              &lt;span class="ui-column-title"&gt;Pcs&lt;/span&gt;
                              {{incomingbookings.pcs}}
                          &lt;/td&gt;
                          &lt;td field="weight"&gt;
                              &lt;span class="ui-column-title"&gt;Weight&lt;/span&gt;
                              {{incomingbookings.weight}}
                          &lt;/td&gt;
                          &lt;td field="volume"&gt;
                              &lt;span class="ui-column-title"&gt;Volume&lt;/span&gt;
                              {{incomingbookings.volume}}
                          &lt;/td&gt;
                          &lt;td field="volume_weight"&gt;
                              &lt;span class="ui-column-title"&gt;Volume Weight&lt;/span&gt;
                              {{incomingbookings.volume_weight}}
                          &lt;/td&gt;
                          &lt;td field="chargeable_weight"&gt;
                              &lt;span class="ui-column-title"&gt;Chargeable Weight&lt;/span&gt;
                              {{incomingbookings.chargeable_weight}}
                          &lt;/td&gt;
                          &lt;td&gt;
                              &lt;span class="ui-column-title"&gt;Add to offer&lt;/span&gt;
                              &lt;p-tableCheckbox [value]="rowData"&gt;&lt;/p-tableCheckbox&gt;
                          &lt;/td&gt;
                          &lt;td&gt;
                              &lt;span class="ui-column-title"&gt;Action&lt;/span&gt;
                              &lt;div class="dropdown"&gt;
                                  &lt;button class="dropbtn"&gt;Action&lt;/button&gt;
                                  &lt;div class="dropdown-content"&gt;
                                  &lt;a href="#"&gt;Accept&lt;/a&gt;
                                  &lt;a href="#"&gt;Waitlist&lt;/a&gt;
                                  &lt;a href="#"&gt;Decline&lt;/a&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
                          &lt;/td&gt;
                      &lt;/tr&gt;
                  &lt;/ng-template&gt;
                  &lt;!--&lt;ng-template pTemplate="summary"&gt;
                      &lt;ul&gt;
                          &lt;li *ngFor="let car of selectedIncomingBookings" style="text-align: left"&gt;
                              {{car.booking_id}}
                          &lt;/li&gt;
                      &lt;/ul&gt;
                  &lt;/ng-template&gt;--&gt;
              &lt;/p-table&gt; 
  </code></pre>
  
  <p>.ts file</p>
  
  <pre><code>ngOnInit() {
  
  this.pageName=this.constructor.name;
  // this.myInnerHeight=window.screen.height;
  this.cols = [
    { field: 'offer_id', header: 'Offer ID' },
    { field: 'booking_id', header: 'Booking ID' },
    { field: 'shipper_info', header: 'Shipper Info' },
    { field: 'pcs', header: 'pcs' },
    { field: 'weight', header: 'Weight' },
    { field: 'volume', header: 'volume' },
    { field: 'volume_weight', header: 'Volume weight' },
    { field: 'chargeable_weight', header: 'Chargeable Weight' },
  ];
  
  this.incomingbookings=[{"offer_id":'1',"booking_id":"12345","shipper_info":[{"name":"hemanth","ratings":"4"}],"pcs":"123","weight":"123","volume":"123","volume_weight":"123","chargeable_weight":""},
  {"offer_id":'2',"booking_id":"123455","shipper_info":[{"name":"hemanth","ratings":"3.5"}],"pcs":"1","weight":"123","volume":"123","volume_weight":"123","chargeable_weight":""},
  {"offer_id":'3',"booking_id":"12345g","shipper_info":[{"name":"hemanth","ratings":"1.5"}],"pcs":"2","weight":"123","volume":"123","volume_weight":"123","chargeable_weight":""},
  {"offer_id":'4',"booking_id":"12345o","shipper_info":[{"name":"hemanth","ratings":"5"}],"pcs":"3","weight":"123","volume":"123","volume_weight":"123","chargeable_weight":""},
  {"offer_id":'5',"booking_id":"12345gk","shipper_info":[{"name":"hemanth","ratings":"1.5"}],"pcs":"4","weight":"123","volume":"123","volume_weight":"123","chargeable_weight":""},
  {"offer_id":'6',"booking_id":"12345gn","shipper_info":[{"name":"hemanth","ratings":"1.5"}],"pcs":"5","weight":"123","volume":"123","volume_weight":"123","chargeable_weight":""},
  {"offer_id":'7',"booking_id":"12345i","shipper_info":[{"name":"hemanth","ratings":"1.5"}],"pcs":"7","weight":"123","volume":"123","volume_weight":"123","chargeable_weight":""},
  {"offer_id":'8',"booking_id":"12345u","shipper_info":[{"name":"hemanth","ratings":"1.5"}],"pcs":"9","weight":"123","volume":"123","volume_weight":"123","chargeable_weight":""},
  {"offer_id":'9',"booking_id":"12345t","shipper_info":[{"name":"hemanth","ratings":"1.5"}],"pcs":"10","weight":"123","volume":"123","volume_weight":"123","chargeable_weight":""},
  {"offer_id":'10',"booking_id":"12345x","shipper_info":[{"name":"hemanth","ratings":"1.5"}],"pcs":"34","weight":"123","volume":"123","volume_weight":"123","chargeable_weight":""},
  {"offer_id":'11',"booking_id":"12345b","shipper_info":[{"name":"hemanth","ratings":"1.5"}],"pcs":"14","weight":"123","volume":"123","volume_weight":"123","chargeable_weight":""},
  {"offer_id":'12',"booking_id":"12345b","shipper_info":[{"name":"hemanth","ratings":"1.5"}],"pcs":"14","weight":"123","volume":"123","volume_weight":"123","chargeable_weight":""},
  {"offer_id":'13',"booking_id":"12345b","shipper_info":[{"name":"hemanth","ratings":"1.5"}],"pcs":"14","weight":"123","volume":"123","volume_weight":"123","chargeable_weight":""},
  {"offer_id":'14',"booking_id":"12345b","shipper_info":[{"name":"hemanth","ratings":"1.5"}],"pcs":"14","weight":"123","volume":"123","volume_weight":"123","chargeable_weight":""}]
  </code></pre>
  
  <p>Normal Tables(before sorting) </p>
  
  <p><a href="https://i.stack.imgur.com/WsHJr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/WsHJr.png" alt="enter image description here"></a>
  initial table when we display data (page 1 of 3). </p>
  
  <p><a href="https://i.stack.imgur.com/y4NnT.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/y4NnT.png" alt="enter image description here"></a>
  initial table when we display data (page 2 of 3). </p>
  
  <p><a href="https://i.stack.imgur.com/kT2vR.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/kT2vR.png" alt="enter image description here"></a>
  initial table when we display data (page 3 of 3). </p>
  
  <p>After Sorting:
  the offerIDs are not coming in increasing order. 10,11,12,13,14 are coming after 1</p>
  
  <p>after sorting button clicked</p>
  
  <p><a href="https://i.stack.imgur.com/bkotl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/bkotl.png" alt="enter image description here"></a>
  sort 1st field offer ID in table (page 1 of 3). </p>
  
  <p><a href="https://i.stack.imgur.com/QUwbf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QUwbf.png" alt="enter image description here"></a>
  sort 1st field offer ID in table (page 2 of 3). </p>
  
  <p><a href="https://i.stack.imgur.com/M4JIl.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/M4JIl.png" alt="enter image description here"></a>
  sort 1st field offer ID in table (page 3 of 3). </p>