@inject('helperClass', 'PowerComponents\LivewirePowerGrid\Helpers\Helpers')
@foreach ($columns as $column)
@php
$content = $row->{$column->field};
$contentClassField = $column->contentClassField != '' ? $row->{$column->contentClassField} : '';
$content = preg_replace('##is', '', $content);
$field = $column->dataField != '' ? $column->dataField : $column->field;
$contentClass = array_key_exists($content, $column->contentClasses) ? $column->contentClasses[$content] : '';
@endphp
@if (data_get($column->editable, 'hasPermission') && !str_contains($field, '.'))
@include($theme->editable->view, ['editable' => $column->editable])
@if ($column->clickToCopy)
@endif
@elseif(count($column->toggleable) > 0)
@php
$rules = $actionRulesClass->recoverFromAction('pg:rows', $row);
$toggleableRules = collect(data_get($rules, 'showHideToggleable', []));
$showToggleable = $toggleableRules->isEmpty() || $toggleableRules->last() == 'show';
@endphp
@include($theme->toggleable->view, ['tableName' => $tableName])
@else
{!! $column->index ? $rowIndex : $content !!}
@if ($column->clickToCopy)
@endif
@endif
|
@endforeach