Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 84f224a

Browse files
committed
refactor: reduce complexity
1 parent ef3d3f2 commit 84f224a

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

‎src/Services/DataTable.php‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -708,11 +708,9 @@ protected function buildFastExcelFile(): FastExcel
708708

709709
$styles = [];
710710
$this->exportColumns()
711-
->reject(fn (Column $column) => $column->exportable === false)
711+
->reject(fn (Column $column) => $column->exportable === false || ! $column->exportFormat)
712712
->each(function (Column $column) use (&$styles) {
713-
if ($column->exportFormat) {
714-
$styles[$column->title] = (new Style)->setFormat($column->exportFormat);
715-
}
713+
$styles[$column->title] = (new Style)->setFormat($column->exportFormat);
716714
});
717715

718716
if ($dataTable instanceof QueryDataTable) {

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /