yajra / laravel-datatables

jQuery DataTables API for Laravel
https://yajrabox.com/docs/laravel-datatables
MIT License
4.75k stars 858 forks source link

Print page dont print footers. #1101

Open d-arken opened 7 years ago

d-arken commented 7 years ago

Summary of problem or feature request

The print button dont print the footers in the table.

Code snippet of problem


 <table class="table table-bordered table-condensed table-striped">
            @php ($flag = true)
            @foreach($data as $row)
                @if ($row == reset($data) && $flag)
                    <tr>
                        @foreach($row as $key => $value)
                            <th>{!! $key !!}</th>
                        @endforeach
                        @php ($flag = false)
                    </tr>
                @endif
                <tr>
                    @foreach($row as $key => $value)
                        @if(is_string($value) || is_numeric($value))
                            <td>{!! $value !!}</td>
                        @else
                            <td></td>
                        @endif
                    @endforeach
                </tr>
            @endforeach
        </table>

Thats the generated table, without

yajra commented 7 years ago

@d-arken good catch. Tagging for enhancement. If you can, please do not hesitate to submit a PR. Thanks!