Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Question: Is it possible to customize the export content of columns? #3200

Open
OzanKurt opened this issue Nov 23, 2024 · 7 comments
Open

Question: Is it possible to customize the export content of columns? #3200

OzanKurt opened this issue Nov 23, 2024 · 7 comments

Comments

@OzanKurt
Copy link
Contributor

I want to have something like editColumnForExport, is this currently possible?

$builder->editColumn('name', function (User $user) {
    return '<a href="#">'.$user->name.'</a>';
});
$builder->editColumnForExport('name', function (User $user) {
    return $user->name;
});
Copy link

This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the stale label Dec 24, 2024
@OzanKurt
Copy link
Contributor Author

@yajra bump

@github-actions github-actions bot removed the stale label Dec 25, 2024
@yajra
Copy link
Owner

yajra commented Jan 4, 2025

I think you can use the Column::make()->exportRender(fn($value) => $value) for this case?

@OzanKurt
Copy link
Contributor Author

OzanKurt commented Jan 4, 2025

I think that is not documented, I will check. Thanks!

Copy link

github-actions bot commented Feb 4, 2025

This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the stale label Feb 4, 2025
@dirkam
Copy link

dirkam commented Feb 4, 2025

@OzanKurt did you manage to solve this? please share your findings, if possible.

@github-actions github-actions bot removed the stale label Feb 5, 2025
@Seb33300
Copy link
Contributor

Seb33300 commented Mar 4, 2025

You can use the method exportRender() on your columns.
And if you are using the laravel-datatables-export plugin, the support for that feature was missing.
But it's now supported since v11.4.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants