We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 8980642 + 8c519f4 commit b9a36aaCopy full SHA for b9a36aa
src/Services/DataTable.php
@@ -678,7 +678,13 @@ public function fastExcelCallback(): Closure
678
$this->exportColumns()
679
->reject(fn (Column $column) => $column->exportable === false)
680
->each(function (Column $column) use (&$mapped, $row) {
681
- $mapped[$column->title] = $row[$column->data];
+ $callback = $column->exportRender ?? null;
682
+
683
+ if (is_callable($callback)) {
684
+ $mapped[$column->title] = $callback($row, $row[$column->data]);
685
+ } else {
686
+ $mapped[$column->title] = $row[$column->data];
687
+ }
688
});
689
690
return $mapped;
0 commit comments