@props([ 'proposals', 'columns' => [], 'showIndex' => true, 'searchId' => 'searchField', 'rowData' => null, 'rowClass' => null, // closure($proposal) => string of extra classes 'rowTitle' => null, // closure($proposal) => string for title attr 'headerClasses' => null ]) @php // Default data-* attributes used by the search filter, unless the caller overrides them. $rowData = $rowData ?? fn ($p) => [ 'title' => mb_strtolower($p->title ?? ''), 'applicant' => mb_strtolower($p->applicant?->fullname ?? ''), ]; @endphp