Skip to content

Commit

Permalink
Format export code
Browse files Browse the repository at this point in the history
  • Loading branch information
wenzhixin committed Jan 7, 2018
1 parent 8f97307 commit 43ef979
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/extensions/export/bootstrap-table-export.js
Original file line number Diff line number Diff line change
Expand Up @@ -129,12 +129,12 @@
that.load(data);
}
};

var stateField = that.header.stateField;

if (that.options.exportDataType === 'all' && that.options.pagination) {
that.$el.one(that.options.sidePagination === 'server' ? 'post-body.bs.table' : 'page-change.bs.table', function () {
if (stateField){
if (stateField) {
that.hideColumn(stateField);
}
doExport();
Expand All @@ -144,8 +144,9 @@
} else if (that.options.exportDataType === 'selected') {
var data = that.getData(),
selectedData = that.getSelections();
if (!selectedData.length)
if (!selectedData.length) {
return;
}

if (that.options.sidePagination === 'server') {
var dataServer = {total: that.options.totalRows};
Expand All @@ -157,18 +158,18 @@
}

that.load(selectedData);
if (stateField){
if (stateField) {
that.hideColumn(stateField);
}
doExport();
that.load(data);
} else {
if (stateField){
if (stateField) {
that.hideColumn(stateField);
}
doExport();
}
if (stateField){
if (stateField) {
that.showColumn(stateField);
}
});
Expand Down

0 comments on commit 43ef979

Please sign in to comment.