Skip to content

Commit 529fe76

Browse files
authored
Merge pull request #407 from 3rgo/summary-row-hidden-columns
Takes into account hidden columns when displaying summary row
2 parents bc3accd + 6bdbb22 commit 529fe76

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

resources/views/livewire/datatables/datatable.blade.php

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -186,13 +186,15 @@ class="flex flex-col items-center h-full px-6 py-5 overflow-hidden text-xs font-
186186
@if ($this->hasSummaryRow())
187187
<div class="table-row p-1">
188188
@foreach($this->columns as $column)
189-
@if ($column['summary'])
190-
<div class="table-cell px-6 py-2 whitespace-no-wrap @if($column['align'] === 'right') text-right @elseif($column['align'] === 'center') text-center @else text-left @endif {{ $this->cellClasses($row, $column) }}">
191-
{{ $this->summarize($column['name']) }}
192-
</div>
193-
@else
194-
<div class="table-cell"></div>
195-
@endif
189+
@unless($column['hidden'])
190+
@if ($column['summary'])
191+
<div class="table-cell px-6 py-2 whitespace-no-wrap @if($column['align'] === 'right') text-right @elseif($column['align'] === 'center') text-center @else text-left @endif {{ $this->cellClasses($row, $column) }}">
192+
{{ $this->summarize($column['name']) }}
193+
</div>
194+
@else
195+
<div class="table-cell"></div>
196+
@endif
197+
@endunless
196198
@endforeach
197199
</div>
198200
@endif

0 commit comments

Comments
 (0)