浏览代码

Added the dragging and dropped row as parameter of the reorder row event

Dustin Utecht 5 年之前
父节点
当前提交
b143ea3ac2
共有 2 个文件被更改,包括 5 次插入2 次删除
  1. 4 1
      site/docs/extensions/reorder-rows.md
  2. 1 1
      src/extensions/reorder-rows/bootstrap-table-reorder-rows.js

+ 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)
 ### 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)
     this.options.onReorderRowsDrop(droppedRow)
 
 
     // Call the event reorder-row
     // Call the event reorder-row
-    this.trigger('reorder-row', newData)
+    this.trigger('reorder-row', newData, draggingRow, droppedRow)
   }
   }
 }
 }