vendor/assets/javascripts/extensions/bootstrap-table-export.js in bootstrap-table-rails-1.8.2.1 vs vendor/assets/javascripts/extensions/bootstrap-table-export.js in bootstrap-table-rails-1.9.0
- old
+ new
@@ -82,11 +82,14 @@
}));
};
if (that.options.exportDataType === 'all' && that.options.pagination) {
that.togglePagination();
- doExport();
- that.togglePagination();
+ that.$el.on('load-success.bs.table', function () {
+ doExport();
+ that.$el.off('load-success.bs.table');
+ that.togglePagination();
+ });
} else if (that.options.exportDataType === 'selected') {
var data = that.getData(),
selectedData = that.getAllSelections();
that.load(selectedData);