Browse Source

Fix #980

Fix #980 Detail view, when searching, returns wrong row

```initBody``` was using ```that.options.data``` (the full table data) instead of ```data``` (the current filtered data) to form the Detail view
Tanner McColeman 10 years ago
parent
commit
0783b3e878
1 changed files with 1 additions and 1 deletions
  1. 1 1
      src/bootstrap-table.js

+ 1 - 1
src/bootstrap-table.js

@@ -1452,7 +1452,7 @@
             var $this = $(this),
                 $tr = $this.parent().parent(),
                 index = $tr.data('index'),
-                row = that.options.data[index];
+                row = data[index]; // Fix #980 Detail view, when searching, returns wrong row
 
             // remove and update
             if ($tr.next().is('tr.detail-view')) {