From 6a1f730d5a4bb0a60f2644778a9c5726c57970dc Mon Sep 17 00:00:00 2001 From: Vlad Rusu Date: Sun, 12 Nov 2023 16:50:59 +0200 Subject: [PATCH] Fix modalClosed event by switching to named arguments (#371) --- resources/js/modal.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/js/modal.js b/resources/js/modal.js index 38ae2d2..80ae044 100644 --- a/resources/js/modal.js +++ b/resources/js/modal.js @@ -32,7 +32,7 @@ window.LivewireUIModal = () => { if (this.getActiveComponentModalAttribute('dispatchCloseEvent') === true) { const componentName = this.$wire.get('components')[this.activeComponent].name; - Livewire.dispatch('modalClosed', componentName); + Livewire.dispatch('modalClosed', {name: componentName}); } if (this.getActiveComponentModalAttribute('destroyOnClose') === true) {