Browse Source

Fixed export-saved event error when exportDataType is all

zhixin 2 years ago
parent
commit
d9f254e42d
2 changed files with 4 additions and 1 deletions
  1. 1 0
      CHANGELOG.md
  2. 3 1
      src/extensions/export/bootstrap-table-export.js

+ 1 - 0
CHANGELOG.md

@@ -5,6 +5,7 @@ ChangeLog
 
 #### Extensions
 
+- **Update(editable):** Fixed `export-saved` event error when `exportDataType` is `all`.
 - **Update(filter-control):** Fixed `searchAccentNeutralise` option not work.
 
 ### 1.22.1

+ 3 - 1
src/extensions/export/bootstrap-table-export.js

@@ -274,15 +274,17 @@ $.BootstrapTable = class extends $.BootstrapTable {
 
       this.$el.one(eventName, () => {
         setTimeout(() => {
+          const data = this.getData()
+
           doExport(() => {
             this.options.virtualScroll = virtualScroll
             this.togglePagination()
           })
+          this.trigger('export-saved', data)
         }, 0)
       })
       this.options.virtualScroll = false
       this.togglePagination()
-      this.trigger('export-saved', this.getData())
     } else if (o.exportDataType === 'selected') {
       let data = this.getData()
       let selectedData = this.getSelections()