Browse Source

Merge pull request #5151 from wenzhixin/feature/5145

Added the dragging and dropped row as parameter of the reorder row event
文翼 5 years ago
parent
commit
f26054299f

+ 4 - 1
site/docs/extensions/reorder-rows.md

@@ -126,4 +126,7 @@ if you want you can include the bootstrap-table-reorder-rows.css file to use the
 
 ### onReorderRow(reorder-row.bs.table)
 
-Fired when the row was dropped, receive as parameter the new data order.
+Fired when the row was dropped, receives two parameters:
+* The new table data
+* The dropped row
+* The row of the old position

+ 1 - 1
src/extensions/reorder-rows/bootstrap-table-reorder-rows.js

@@ -90,6 +90,6 @@ $.BootstrapTable = class extends $.BootstrapTable {
     this.options.onReorderRowsDrop(droppedRow)
 
     // Call the event reorder-row
-    this.trigger('reorder-row', newData)
+    this.trigger('reorder-row', newData, draggingRow, droppedRow)
   }
 }