Skip to content

Commit 56b94a4

Browse files
committed
use callback function which was set in colum->exportRender method to parse print + exports as expected (commit d48dc1bbe8bc860070240d6f1444e7a861c53789 in laravel-datatables-html)
1 parent 3438d8b commit 56b94a4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Transformers/DataArrayTransformer.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,12 @@ protected function buildColumnByCollection(array $row, Collection $columns, stri
5252
$data = is_array($data) ? json_encode($data) : $this->decodeContent($data);
5353
}
5454

55-
$results[$title] = $data;
55+
if(isset($column->exportRender)){
56+
$callback = $column->exportRender;
57+
$results[$title] = $callback($row,$data);
58+
}else{
59+
$results[$title] = $data;
60+
}
5661
}
5762
});
5863

0 commit comments

Comments
 (0)