From 8a8aeee600a5a83a589ed3adc6956190a49046b8 Mon Sep 17 00:00:00 2001 From: Bryant Dinh Date: Fri, 26 Apr 2024 22:49:06 -0700 Subject: [PATCH 1/2] Bugfix for dispatching events with correct uuid when multiple components are on a page. --- resources/views/livewire/dropzone.blade.php | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/resources/views/livewire/dropzone.blade.php b/resources/views/livewire/dropzone.blade.php index b52d865..c022344 100644 --- a/resources/views/livewire/dropzone.blade.php +++ b/resources/views/livewire/dropzone.blade.php @@ -2,7 +2,8 @@ x-cloak x-data="dropzone({ _this: @this, - multiple: @js($multiple) + multiple: @js($multiple), + uuid: '{{ $uuid }}' })" @dragenter.prevent.document="onDragenter($event)" @dragleave.prevent="onDragleave($event)" @@ -117,7 +118,7 @@ class="dz-hidden" @script @endscript - \ No newline at end of file + From 89e8bb39bd126073a68fe76d568710a78bc27e66 Mon Sep 17 00:00:00 2001 From: Dasun Tharanga Date: Sat, 27 Apr 2024 17:27:46 +0530 Subject: [PATCH 2/2] refactor: Use @js blade directive --- resources/views/livewire/dropzone.blade.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/views/livewire/dropzone.blade.php b/resources/views/livewire/dropzone.blade.php index c022344..30cdcf3 100644 --- a/resources/views/livewire/dropzone.blade.php +++ b/resources/views/livewire/dropzone.blade.php @@ -2,8 +2,8 @@ x-cloak x-data="dropzone({ _this: @this, + uuid: @js($uuid) multiple: @js($multiple), - uuid: '{{ $uuid }}' })" @dragenter.prevent.document="onDragenter($event)" @dragleave.prevent="onDragleave($event)"