title: PrimeNG DataTable reorder rows
body: <p>I have an Angular 4 application with PrimeNG.  In it, I have a DataTable which has a few rows, each one with its own RowIndex field.  The DataTable is sorted by RowIndex.  </p>
  
  <p>What I am trying to achieve is to allow the user to reorder the rows, saving the new order as soon as they drop the row in its new place.  My understanding is that PrimeNG currently does not support this out of the box.  So, after some searching, I found this implementation: <a href="https://embed.plnkr.co/Mivcv5/" rel="nofollow noreferrer">https://embed.plnkr.co/Mivcv5/</a></p>
  
  <p>This example uses <a href="https://github.com/valor-software/ng2-dragula" rel="nofollow noreferrer">https://github.com/valor-software/ng2-dragula</a> to accomplish the reordering.  Everything works great except that I am having trouble capturing the change and updating the database with the new order. </p>
  
  <p>So far, the best solution I found is to get a reference to the actual dom table element and traverse the TR elements examining the cells to determine what changed in the order of the rows.  This works, but I really do not consider this a viable solution.</p>
  
  <p>I was wondering if anyone had come across a similar problem and if there is a better way of accomplishing this.</p>
  
  <p>Thank you. </p>