laravel-datatables-buttons icon indicating copy to clipboard operation
laravel-datatables-buttons copied to clipboard

Print Specific Columns. How can I get $excludeFromPrint=[] array value dynamically from colvis. I am using InfyOm generator and Yajra Datatable

Open skabirgithub opened this issue 2 years ago • 1 comments

Summary of problem or feature request

Print Specific Columns. How can I get $excludeFromPrint=[] array value dynamically from colvis. I am using InfyOm generator and Yajra Datatable

Code snippet of problem

protected $excludeFromPrint = [];

protected function getPrintColumnsFromBuilder()
{
    return $this->html()->removeColumn(...$this->excludeFromPrint)->getColumns();
}

System details

  • Operating System
  • PHP Version
  • Laravel Version
  • Laravel-DataTables Version

skabirgithub avatar Apr 08 '23 08:04 skabirgithub

Quick answer, not supported as the colvis button does not support server-side implementation afaik.

However, I think you can create a custom button for this. See https://github.com/yajra/laravel-datatables-buttons/blob/master/src/resources/assets/buttons.server-side.js#L160 for reference.

yajra avatar Apr 12 '23 06:04 yajra