This commit is contained in:
salam committed 2026-09-15 11:26:16 +02:00
1 parent 085dc78e26
commit 958944f21c
6 files changed
+30 -16

No files matched your search

+3 -2
View File
@@ -18,6 +18,7 @@ class PlayerPropsTable extends TableWidget
use InteractsWithForms;
protected int|string|array $columnSpan = 2;
public int $team_id;
public array $players;
@@ -56,7 +57,7 @@ class PlayerPropsTable extends TableWidget
->emptyStateHeading('No team selected')
->columns([
ViewColumn::make('drag_card')
->label(fn() => $this->getHeadingTable())
->label(fn () => $this->getHeadingTable())
->view('filament.tables.columns.drag-card'),
])->extraAttributes([
'id' => 'playerdragtable',
@@ -86,7 +87,7 @@ class PlayerPropsTable extends TableWidget
], layout: FiltersLayout::AboveContent)
->deferFilters(false)
->records(function () {
$collection = collect($this->players);
$collection = collect($this->players)->sortBy('order');
$selectedPosition = $this->tableFilters['positions']['area'] ?? null;
if (! empty($selectedPosition)) {
$collection = $collection->where('area', $selectedPosition);