Fixed livewire script loading issues
This commit is contained in:
parent
b2b8bca9ea
commit
e3b6d302c6
11 changed files with 37 additions and 28 deletions
|
|
@ -21,20 +21,27 @@
|
|||
<div class="w-full flex-shrink-0 flex flex-col gap-5">
|
||||
<div class="flex flex-col-reverse sm:flex-row gap-5 sm:gap-0 justify-between w-full">
|
||||
<input class="flex bg-white p-2 rounded sm:w-100" type="text" placeholder="Filter movies"
|
||||
wire:model="filterText"
|
||||
wire:model.live="filterText"
|
||||
wire:keyup="filterMovies"/>
|
||||
|
||||
<button wire:click="$dispatch('openSearch')" class="bg-green-500 text-white p-2 rounded">
|
||||
Add Movie
|
||||
</button>
|
||||
</div>
|
||||
<ul class="grid grid-cols-2 sm:grid-cols-4 gap-5">
|
||||
@foreach ($filteredMovies as $movie)
|
||||
<li class="bg-gray-200">
|
||||
<x-movie :movie="$movie"/>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
@if(!empty($filteredMovies))
|
||||
<ul class="grid grid-cols-2 sm:grid-cols-4 gap-5">
|
||||
@foreach ($filteredMovies as $movie)
|
||||
<li class="bg-gray-200">
|
||||
<x-movie :movie="$movie"/>
|
||||
</li>
|
||||
@endforeach
|
||||
</ul>
|
||||
@else
|
||||
<div class="flex flex-col items-center justify-center my-10">
|
||||
<span class="text-center p-5 font-bold text-2xl">"You complete me."</span>
|
||||
<span class="text-center">Tom Cruise, <i>Jerry Maguire</i></span>
|
||||
</div>
|
||||
@endif
|
||||
</div>
|
||||
|
||||
<!-- Settings View -->
|
||||
|
|
@ -49,7 +56,7 @@
|
|||
<div class="flex flex-col gap-2 w-full">
|
||||
<label for="list-name">List Name</label>
|
||||
<div class="flex flex-row">
|
||||
<input type="text" wire:model="settingsForm.name" id="list-name"
|
||||
<input type="text" wire:model.live="settingsForm.name" id="list-name"
|
||||
class="w-full p-2 rounded rounded-r-none bg-white"/>
|
||||
<button class="bg-green-400 p-2 rounded-r" type="submit" wire:click="saveSettings">Save
|
||||
</button>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue