fix(#74): switch out of sync when deleting / moving items in table
Some checks failed
tests / ci (push) Has been cancelled

This commit is contained in:
Benjamin Nussbaum 2025-08-12 14:34:32 +02:00
parent 6bc74b2c5c
commit caaf5f8755
2 changed files with 5 additions and 5 deletions

View file

@ -632,7 +632,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">
@ -649,7 +649,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>