mirror of
https://github.com/usetrmnl/byos_laravel.git
synced 2026-01-13 23:18:10 +00:00
fix(#74): switch out of sync when deleting / moving items in table
Some checks failed
tests / ci (push) Has been cancelled
Some checks failed
tests / ci (push) Has been cancelled
This commit is contained in:
parent
6bc74b2c5c
commit
caaf5f8755
2 changed files with 5 additions and 5 deletions
|
|
@ -155,7 +155,7 @@ new class extends Component {
|
|||
<div class="flex items-center justify-between mb-4">
|
||||
<div class="flex items-center gap-4">
|
||||
<h4 class="text-lg font-medium dark:text-zinc-200">{{ $playlist->name }}</h4>
|
||||
<flux:switch wire:model.live="playlist.is_active"
|
||||
<flux:switch wire:model="playlist.is_active"
|
||||
wire:click="togglePlaylistActive({{ $playlist->id }})"
|
||||
:checked="$playlist->is_active"/>
|
||||
</div>
|
||||
|
|
@ -199,7 +199,7 @@ new class extends Component {
|
|||
</thead>
|
||||
<tbody class="divide-y divide-zinc-800/10 dark:divide-white/20" data-flux-rows>
|
||||
@foreach($playlist->items->sortBy('order') as $item)
|
||||
<tr data-flux-row>
|
||||
<tr data-flux-row wire:key="playlist-item-{{ $item->id }}">
|
||||
<td class="py-3 px-3 first:pl-0 last:pr-0 text-sm whitespace-nowrap text-zinc-500 dark:text-zinc-300">
|
||||
@if($item->isMashup())
|
||||
<div class="flex items-center gap-2">
|
||||
|
|
@ -216,7 +216,7 @@ new class extends Component {
|
|||
@endif
|
||||
</td>
|
||||
<td class="py-3 px-3 first:pl-0 last:pr-0 text-sm whitespace-nowrap text-zinc-500 dark:text-zinc-300">
|
||||
<flux:switch wire:model.live="item.is_active"
|
||||
<flux:switch
|
||||
wire:click="togglePlaylistItemActive({{ $item->id }})"
|
||||
:checked="$item->is_active"/>
|
||||
</td>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue