From bfca0891e991861f2cd02174f38bd8b728a2448a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bastian=20Fie=C3=9Finger?= <41627893+bfiessinger@users.noreply.github.com> Date: Wed, 1 Sep 2021 14:27:47 +0200 Subject: [PATCH] fix cascading livewire select inputs nulled after repainting (multiple select) --- resources/views/default.blade.php | 5 +- resources/views/multiple.blade.php | 128 ++++++++++++++++------------- src/LivewireSelect.php | 48 ++++++----- 3 files changed, 102 insertions(+), 79 deletions(-) diff --git a/resources/views/default.blade.php b/resources/views/default.blade.php index 2655694..7b40484 100644 --- a/resources/views/default.blade.php +++ b/resources/views/default.blade.php @@ -8,7 +8,10 @@ class="{{ $styles['default'] }}" @foreach($options as $option) - @endforeach diff --git a/resources/views/multiple.blade.php b/resources/views/multiple.blade.php index 8196909..1a4d99b 100644 --- a/resources/views/multiple.blade.php +++ b/resources/views/multiple.blade.php @@ -1,90 +1,102 @@
-
-
-
-
-
- +
+
+
+ + + +
+
-
-
- +
+
+ diff --git a/src/LivewireSelect.php b/src/LivewireSelect.php index 519dda4..e2da1ba 100755 --- a/src/LivewireSelect.php +++ b/src/LivewireSelect.php @@ -270,13 +270,13 @@ public function js($options = null) { 'livewire-select-multiple' => '' ];