fix: use callback function if exportRender method is set #177
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
this commit is paired with another commit d48dc1bbe8bc860070240d6f1444e7a861c53789 which should be pushed together to make final result:
this commit is about development not bug fix:
i realize a need to render column data for export, i found it by adding Export Class to set how to render export
but i couldn't find any thing for render print
and i need a centralized render for print & export (for simplicity & integrity)
so i added exportRender method to be used for pass a callback function to determine how targeted column data should be rendered for print & export, sample code is shown below:
Column::make('used')->title('Use Status')->exportRender(function($row,$data){return $data == 1 ? 'Yes' : 'Not Yet'});
but in this commit we write just use of callback function for rendering column to print or export as we expected
but commit d48dc1bbe8bc860070240d6f1444e7a861c53789 in laravel-datatable-html repo should be pushed to exportRender method added to Column Builder for adding callback function
please accept that pull request before this pull request