Skip to content

Commit

Permalink
Fixed hide loading bug when canceling the request (#6080)
Browse files Browse the repository at this point in the history
  • Loading branch information
wenzhixin authored Mar 14, 2022
1 parent f567d9d commit 5449f35
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/bootstrap-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -2012,7 +2012,9 @@ class BootstrapTable {
}
this.load(data)
this.trigger('load-error', jqXHR && jqXHR.status, jqXHR)
if (!silent) this.$tableLoading.hide()
if (!silent) {
this.hideLoading()
}
}
})

Expand Down
8 changes: 6 additions & 2 deletions src/extensions/pipeline/bootstrap-table-pipeline.js
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,9 @@ BootstrapTable.prototype.initServer = function (silent, query, url) {
}
self.load(res)
self.trigger('load-success', res)
if (!silent) self.$tableLoading.hide()
if (!silent) {
self.hideLoading()
}
},
error (res) {
let data = []
Expand All @@ -312,7 +314,9 @@ BootstrapTable.prototype.initServer = function (silent, query, url) {
}
self.load(data)
self.trigger('load-error', res.status, res)
if (!silent) self.$tableLoading.hide()
if (!silent) {
self.hideLoading()
}
}
})

Expand Down

0 comments on commit 5449f35

Please sign in to comment.