Skip to content

Commit d48dc1b

Browse files
committed
add exportRender method to be used in datatable-buttons for render print + exports as expected
1 parent eee4dac commit d48dc1b

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/Html/Column.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,20 @@ public function render(mixed $value): static
491491
return $this;
492492
}
493493

494+
/**
495+
* Set Callback function to render column for Print + Export
496+
*
497+
* @param function $callback
498+
* @return $this
499+
500+
*/
501+
public function exportRender(callable $callback): static
502+
{
503+
$this->attributes['exportRender'] = $callback;
504+
505+
return $this;
506+
}
507+
494508
/**
495509
* Parse render attribute.
496510
*

0 commit comments

Comments
 (0)