浏览代码

Fix resizable height bug.

zhixin 10 年之前
父节点
当前提交
4633460a4f
共有 1 个文件被更改,包括 8 次插入3 次删除
  1. 8 3
      src/extensions/resizable/bootstrap-table-resizable.js

+ 8 - 3
src/extensions/resizable/bootstrap-table-resizable.js

@@ -54,11 +54,16 @@
     };
 
     BootstrapTable.prototype.resetView = function () {
-        if (this.options.resizable) {
-            initResizable(this);
-        }
+        var that = this;
 
         _resetView.apply(this, Array.prototype.slice.apply(arguments));
+
+        if (this.options.resizable) {
+            // because in fitHeader function, we use setTimeout(func, 100);
+            setTimeout(function () {
+                initResizable(that);
+            }, 100);
+        }
     };
 
     BootstrapTable.prototype.onResize = function (e) {