Skip to content

Commit

Permalink
Merge pull request #529 from tighten/ajm/fix-frontend-build
Browse files Browse the repository at this point in the history
Re-enable live conference list behavior
  • Loading branch information
andrewmile authored Dec 14, 2024
2 parents fe2af34 + d8a3f6e commit 3698457
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 9 deletions.
13 changes: 9 additions & 4 deletions app/Livewire/ConferenceList.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -57,7 +58,8 @@ public function render()
])->extends('app');
}

public function getConferenceQueryProperty()
#[Computed]
public function conferenceQuery()
{
return Conference::searchQuery($this->search, function ($query) {
$query
Expand All @@ -78,7 +80,8 @@ public function getConferenceQueryProperty()
})->paginate();
}

public function getConferencesProperty()
#[Computed]
public function conferences()
{
return $this->conferenceQuery
->groupByMonth($this->dateColumn())
Expand All @@ -98,7 +101,8 @@ public function getConferencesProperty()
});
}

public function getFilterOptionsProperty()
#[Computed]
public function filterOptions()
{
$filterOptions = [
['label' => 'All', 'value' => 'all'],
Expand All @@ -116,7 +120,8 @@ public function getFilterOptionsProperty()
return $filterOptions;
}

public function getSortOptionsProperty()
#[Computed]
public function sortOptions()
{
return [
['label' => 'Title', 'value' => 'title'],
Expand Down
4 changes: 2 additions & 2 deletions resources/views/components/input/select.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
}
@endphp

<div {{ $attributes->except(['v-model', 'wire:model'])->class($classList) }}>
<div {{ $attributes->except(['v-model', 'wire:model.live'])->class($classList) }}>
<label
for="currency"
class="
Expand All @@ -36,7 +36,7 @@ class="
">
<select
name="{{ $name }}"
{{ $attributes->only(['v-model', 'wire:model']) }}
{{ $attributes->only(['v-model', 'wire:model.live']) }}
class="
border-form-200 form-input rounded w-full
@unless ($hideLabel) mt-1 @endunless
Expand Down
6 changes: 3 additions & 3 deletions resources/views/livewire/conference-list.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<x-input.text
name="search"
placeholder="Search conferences"
wire:model="search"
wire:model.live="search"
class="flex-1"
/>
<x-input.select
Expand All @@ -13,7 +13,7 @@ class="flex-1"
option-text="label"
option-value="value"
:options="$this->filter_options"
wire:model="filter"
wire:model.live="filter"
class="w-1/4"
label-class="font-semibold text-gray-500"
input-class="font-semibold text-indigo-600"
Expand All @@ -25,7 +25,7 @@ class="w-1/4"
option-text="label"
option-value="value"
:options="$this->sort_options"
wire:model="sort"
wire:model.live="sort"
class="w-1/4"
label-class="font-semibold text-gray-500"
input-class="font-semibold text-indigo-600"
Expand Down

0 comments on commit 3698457

Please sign in to comment.