Skip to content

Commit 65c834c

Browse files
committed
fix: hashtag list wire key
1 parent 8d5eecf commit 65c834c

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed
Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
<div class="flex flex-wrap gap-1 px-1">
22
@foreach ($todo->hashtags as $hashtag)
3-
<button type="button" wire:confirm="Are you sure you want to remove #{{ $hashtag->name }}?"
4-
@if ($clickable) wire:click="removeHashtag('{{ $hashtag->id }}')"
5-
class="text-muted-foreground text-sm hover:text-destructive"
6-
@else
7-
class="text-muted-foreground text-sm" @endif>
8-
#{{ $hashtag->name }}
9-
</button>
3+
@if ($clickable)
4+
<button type="button" wire:confirm="Are you sure you want to remove #{{ $hashtag->name }}?"
5+
wire:key="hashtag-{{ $hashtag->id }}" wire:click="removeHashtag('{{ $hashtag->id }}')"
6+
class="text-muted-foreground text-sm hover:text-destructive">
7+
#{{ $hashtag->name }}
8+
</button>
9+
@else
10+
<span class="text-muted-foreground text-sm">
11+
#{{ $hashtag->name }}
12+
</span>
13+
@endif
1014
@endforeach
1115
</div>

0 commit comments

Comments
 (0)