Browse Source

Merge branch 'develop' into develop

Dustin Utecht 4 years ago
parent
commit
411f7e9972
2 changed files with 9 additions and 2 deletions
  1. 2 2
      site/docs/extensions/custom-view.md
  2. 7 0
      src/bootstrap-table.js

+ 2 - 2
site/docs/extensions/custom-view.md

@@ -76,11 +76,11 @@ This extension adds the ability to create a custom view to display the data.
 
 ## Events
 
-### onCustomViewPostBody(custom-view-post-body.bs.table)
+### onCustomViewPreBody(custom-view-pre-body.bs.table)
 
 * Fires before the custom view was rendered.
 
-### onCustomViewPreBody(custom-view-pre-body.bs.table)
+### onCustomViewPostBody(custom-view-post-body.bs.table)
 
 * Fires after the custom view was rendered.
 

+ 7 - 0
src/bootstrap-table.js

@@ -1951,6 +1951,12 @@ class BootstrapTable {
         }
       },
       error: jqXHR => {
+        // abort ajax by multiple request
+        if (jqXHR && jqXHR.status === 0 && this._xhrAbort) {
+          this._xhrAbort = false
+          return
+        }
+
         let data = []
 
         if (this.options.sidePagination === 'server') {
@@ -1968,6 +1974,7 @@ class BootstrapTable {
       Utils.calculateObjectValue(this, this.options.ajax, [request], null)
     } else {
       if (this._xhr && this._xhr.readyState !== 4) {
+        this._xhrAbort = true
         this._xhr.abort()
       }
       this._xhr = $.ajax(request)