I want to trigger a reorder event after I drag and drop two rows data but I cannot see it in the document below:
https://www.primefaces.org/primeng/#/table/reorder
Can anyone help me, thanks!
Asked
Active
Viewed 7,130 times
5

luc
- 103
- 2
- 8
2 Answers
13
As per the documentation ,
there are two callbacks available ,
onColReorder - Callback to invoke when a column is reordered
onRowReorder - Callback to invoke when a row is reordered.
They are listed under on the events portion on the same page

Srinivasan Sekar
- 2,049
- 13
- 22
2
For those wondering where to bind the onRowReorder
callback to catch row reorder event.
app.component.html:
<p-table [value]="products" (onRowReorder)="onRowReorder($event)">
...
</p-table>
app.component.ts:
onRowReorder(event){
console.log(event); //{dragIndex: 1, dropIndex: 2}
}

Kugan Kumar
- 423
- 1
- 8
- 14