Skip to content

Commit

Permalink
Calendar: add wire:key (#706)
Browse files Browse the repository at this point in the history
Close #705
  • Loading branch information
robsontenorio authored Nov 12, 2024
1 parent bd34eda commit d88af3a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/View/Components/Calendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ public function popups()
public function render(): View|Closure|string
{
return <<<'HTML'
<div x-data x-init="const calendar = new VanillaCalendar($el, {{ $setup() }}); calendar.init()" class="w-fit">
<div wire:key="calendar-{{ rand() }}">
<div x-data x-init="const calendar = new VanillaCalendar($el, {{ $setup() }}); calendar.init();" class="w-fit"></div>
</div>
HTML;
}
Expand Down

0 comments on commit d88af3a

Please sign in to comment.