|
|
@@ -1690,6 +1690,7 @@ class BootstrapTable {
|
|
|
callback: () => {
|
|
|
this.fitHeader()
|
|
|
this.initBodyEvent()
|
|
|
+ this.updateSelected()
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
@@ -1968,6 +1969,10 @@ class BootstrapTable {
|
|
|
}
|
|
|
|
|
|
updateSelected () {
|
|
|
+ if (!this.$selectItem.length) {
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
const checkAll = this.$selectItem.filter(':enabled').length &&
|
|
|
this.$selectItem.filter(':enabled').length ===
|
|
|
this.$selectItem.filter(':enabled').filter(':checked').length
|
|
|
@@ -2779,6 +2784,13 @@ class BootstrapTable {
|
|
|
this.updateRows()
|
|
|
this.updateSelected()
|
|
|
|
|
|
+ if (this.options.virtualScroll) {
|
|
|
+ for (const row of this.data) {
|
|
|
+ row[this.header.stateField] = checked
|
|
|
+ }
|
|
|
+ this.initBody(true)
|
|
|
+ }
|
|
|
+
|
|
|
const rowsAfter = this.getSelections()
|
|
|
|
|
|
if (checked) {
|