Skip to content

Commit

Permalink
Fix #283: Correct export columns validation
Browse files Browse the repository at this point in the history
  • Loading branch information
kartik-v committed Nov 10, 2018
1 parent e4a1e46 commit e4c2fd5
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
4 changes: 3 additions & 1 deletion CHANGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ Change Log: `yii2-export`

## version 1.3.7

**Date:** _under development_
**Date:** 10-Nov-2018

- (enh #283): Correct export columns validation.
- (enh #282): Include use `yii\db\QueryInterface`.
- (enh #281): Correct export download to allow parsing new lines in content.
- (enh #280): Correct attribute label parsing.
- Update README.
Expand Down
2 changes: 1 addition & 1 deletion src/ExportMenu.php
Original file line number Diff line number Diff line change
Expand Up @@ -1224,7 +1224,7 @@ public function setVisibleColumns()
$columns = [];
foreach ($this->columns as $key => $column) {
$isActionColumn = $column instanceof ActionColumn;
$isNoExport = in_array($key, $this->noExportColumns);
$isNoExport = in_array($key, $this->noExportColumns) || !in_array($key, $this->selectedColumns);
if ($isActionColumn && !$isNoExport) {
$this->noExportColumns[] = $key;
}
Expand Down
2 changes: 1 addition & 1 deletion src/ExportWriterPdf.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ public function save($pFilename)
'SetAuthor' => $properties->getCreator(),
'SetSubject' => $properties->getSubject(),
'SetKeywords' => $properties->getKeywords(),
'SetCreator' => $properties->getCreator()
'SetCreator' => $properties->getCreator(),
],
]);
$content = $this->generateHTMLHeader(false) . $this->generateSheetData() . $this->generateHTMLFooter();
Expand Down
1 change: 1 addition & 0 deletions src/assets/js/kv-export-data.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@
});
expCols = JSON.stringify(cols);
}
console.log(expCols);
$form = $('<form/>', frmConfig).append($csrf)
.append(getInput(cfg.exportTypeParam, fmt), getInput(cfg.exportRequestParam, 1))
.append(getInput(cfg.exportColsParam, expCols), getInput(cfg.colSelFlagParam, cfg.colSelEnabled))
Expand Down

0 comments on commit e4c2fd5

Please sign in to comment.