Browse Source

Fix nested table bug.

zhixin 10 years ago
parent
commit
996ca58797
1 changed files with 3 additions and 3 deletions
  1. 3 3
      src/bootstrap-table.js

+ 3 - 3
src/bootstrap-table.js

@@ -1395,13 +1395,13 @@
                 }
             }
         });
-        this.$body.find('tr').off('dblclick').on('dblclick', function () {
+        this.$body.find('> tr').off('dblclick').on('dblclick', function () {
             that.trigger('dbl-click-row', that.data[$(this).data('index')], $(this));
         });
 
-        this.$body.find('.detail-icon').off('click').on('click', function () {
+        this.$body.find('> tr > td > .detail-icon').off('click').on('click', function () {
             var $this = $(this),
-                $tr = $this.parents('tr'),
+                $tr = $this.parent().parent(),
                 index = $tr.data('index'),
                 row = that.options.data[index];