From 14924aa820e4af187bec22f9fd92c573ba47a483 Mon Sep 17 00:00:00 2001 From: Iosif Chatzimichail Date: Thu, 7 Nov 2024 14:02:20 +0200 Subject: [PATCH] Fix an issue when the filter was cleared using its Tag --- src/Http/Livewire/LfCheckboxFilter.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Http/Livewire/LfCheckboxFilter.php b/src/Http/Livewire/LfCheckboxFilter.php index 9db4884..51e7b9d 100644 --- a/src/Http/Livewire/LfCheckboxFilter.php +++ b/src/Http/Livewire/LfCheckboxFilter.php @@ -61,7 +61,7 @@ public function clearOption($tag) { if ($tag['field'] === $this->field) { if (in_array($tag['value'], $this->selected)) { - $this->selected = array_diff($this->selected, [$tag['value']]); + $this->selected = array_values(array_diff($this->selected, [$tag['value']])); $this->updatedSelected(); } }