{{-- Enterprise Data Table — reusable across Products, Inventory, Customers, Sales, etc. ... --}} @props([ 'id' => 'data-table-' . uniqid(), 'title' => '', 'subtitle' => '', 'selectable' => false, 'searchable' => true, 'searchPlaceholder' => 'Search all columns…', 'exportable' => true, 'pageSize' => 10, 'pageSizes' => [10, 25, 50, 100], 'emptyTitle' => 'No records found', 'emptyMessage' => 'Try adjusting search or filters.', 'loading' => false, ]) @php $sizes = is_array($pageSizes) ? $pageSizes : array_map('intval', explode(',', (string) $pageSizes)); $hasToolbarPanel = $title !== '' || isset($toolbarActions) || $searchable || isset($filters) || $exportable; @endphp
class(['edt']) }} id="{{ $id }}-wrap" data-edt data-edt-id="{{ $id }}" data-page-size="{{ (int) $pageSize }}" data-selectable="{{ $selectable ? '1' : '0' }}" > @if ($hasToolbarPanel)
@if ($title !== '' || isset($toolbarActions))
@if ($title !== '')

{{ $title }}

@endif @if ($subtitle !== '')

{{ $subtitle }}

@endif
@isset($toolbarActions)
{{ $toolbarActions }}
@endisset
@endif
@if ($searchable) @endif @isset($filters)
{{ $filters }}
@endisset
@if ($exportable)
@endif
@endif @isset($afterToolbar)
{{ $afterToolbar }}
@endisset
@if ($selectable) @endif
@if ($selectable) @endif {{ $head }} {{ $body }}
No.Actions