From d8a3f6e179d978d325885a8be0dd86ab90beb0e9 Mon Sep 17 00:00:00 2001 From: Andrew Morgan Date: Fri, 13 Dec 2024 21:51:27 -0500 Subject: [PATCH] Re-enable live conference list behavior --- app/Livewire/ConferenceList.php | 13 +++++++++---- resources/views/components/input/select.blade.php | 4 ++-- resources/views/livewire/conference-list.blade.php | 6 +++--- 3 files changed, 14 insertions(+), 9 deletions(-) diff --git a/app/Livewire/ConferenceList.php b/app/Livewire/ConferenceList.php index 63953f7e..fc61bf26 100644 --- a/app/Livewire/ConferenceList.php +++ b/app/Livewire/ConferenceList.php @@ -6,6 +6,7 @@ use Carbon\CarbonImmutable; use Illuminate\Database\Eloquent\Builder; use Illuminate\Support\Collection; +use Livewire\Attributes\Computed; use Livewire\Component; use Livewire\WithPagination; @@ -57,7 +58,8 @@ public function render() ])->extends('app'); } - public function getConferenceQueryProperty() + #[Computed] + public function conferenceQuery() { return Conference::searchQuery($this->search, function ($query) { $query @@ -78,7 +80,8 @@ public function getConferenceQueryProperty() })->paginate(); } - public function getConferencesProperty() + #[Computed] + public function conferences() { return $this->conferenceQuery ->groupByMonth($this->dateColumn()) @@ -98,7 +101,8 @@ public function getConferencesProperty() }); } - public function getFilterOptionsProperty() + #[Computed] + public function filterOptions() { $filterOptions = [ ['label' => 'All', 'value' => 'all'], @@ -116,7 +120,8 @@ public function getFilterOptionsProperty() return $filterOptions; } - public function getSortOptionsProperty() + #[Computed] + public function sortOptions() { return [ ['label' => 'Title', 'value' => 'title'], diff --git a/resources/views/components/input/select.blade.php b/resources/views/components/input/select.blade.php index 376cb67f..396d33d2 100644 --- a/resources/views/components/input/select.blade.php +++ b/resources/views/components/input/select.blade.php @@ -19,7 +19,7 @@ } @endphp -
except(['v-model', 'wire:model'])->class($classList) }}> +
except(['v-model', 'wire:model.live'])->class($classList) }}>