Browse Source

Merge branch 'patch-2' of https://github.com/D0d0/bootstrap-table into D0d0-patch-2

zhixin 9 years ago
parent
commit
e476e88c7d
1 changed files with 4 additions and 1 deletions
  1. 4 1
      src/bootstrap-table.js

+ 4 - 1
src/bootstrap-table.js

@@ -1978,7 +1978,10 @@
         if (this.options.ajax) {
             calculateObjectValue(this, this.options.ajax, [request], null);
         } else {
-            $.ajax(request);
+            if(this._xhr) {
+                this._xhr.abort();
+            }
+            this._xhr = $.ajax(request);
         }
     };