@aware([ 'tableName', 'primaryKey','isTailwind','isBootstrap']) @props(['row', 'rowIndex']) @php $customAttributes = $this->getTrAttributes($row, $rowIndex); @endphp @if ($this->collapsingColumnsAreEnabled() && $this->hasCollapsedColumns()) @php $colspan = $this->getColspanCount(); $columns = collect(); if($this->shouldCollapseAlways()) { $columns->push($this->getCollapsedAlwaysColumns()); } if ($this->shouldCollapseOnMobile() && $this->shouldCollapseOnTablet()) { $columns->push($this->getCollapsedMobileColumns()); $columns->push($this->getCollapsedTabletColumns()); } elseif ($this->shouldCollapseOnTablet() && ! $this->shouldCollapseOnMobile()) { $columns->push($this->getCollapsedTabletColumns()); } elseif ($this->shouldCollapseOnMobile() && ! $this->shouldCollapseOnTablet()) { $columns->push($this->getCollapsedMobileColumns()); } $columns = $columns->collapse(); @endphp
$isTailwind && $column->shouldCollapseAlways(), 'block mb-2 sm:hidden' => $isTailwind && !$column->shouldCollapseAlways() && !$column->shouldCollapseOnTablet() && !$column->shouldCollapseOnMobile(), 'block mb-2 md:hidden' => $isTailwind && !$column->shouldCollapseAlways() && !$column->shouldCollapseOnTablet() && $column->shouldCollapseOnMobile(), 'block mb-2 lg:hidden' => $isTailwind && !$column->shouldCollapseAlways() && ($column->shouldCollapseOnTablet() || $column->shouldCollapseOnMobile()), 'd-block mb-2' => $isBootstrap && $column->shouldCollapseAlways(), 'd-block mb-2 d-sm-none' => $isBootstrap && !$column->shouldCollapseAlways() && !$column->shouldCollapseOnTablet() && !$column->shouldCollapseOnMobile(), 'd-block mb-2 d-md-none' => $isBootstrap && !$column->shouldCollapseAlways() && !$column->shouldCollapseOnTablet() && $column->shouldCollapseOnMobile(), 'd-block mb-2 d-lg-none' => $isBootstrap && !$column->shouldCollapseAlways() && ($column->shouldCollapseOnTablet() || $column->shouldCollapseOnMobile()), ]) > {{ $column->getTitle() }}: {{ $column->renderContents($row) }}
@endforeach