Skip to content

Commit eeaf772

Browse files
committed
fix removing a multiselect filter
1 parent 91f1f2b commit eeaf772

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/Traits/WithFilters.php

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,9 +269,17 @@ public function getFiltersWithoutSearch(): array
269269
*/
270270
public function removeFilter($filter): void
271271
{
272-
if (isset($this->filters[$filter])) {
273-
$this->filters[$filter] = null;
272+
if (! isset($this->filters[$filter])) {
273+
return;
274+
}
275+
276+
if ($this->filters()[$filter]->isMultiSelect()) {
277+
$this->filters[$filter] = [];
278+
279+
return;
274280
}
281+
282+
$this->filters[$filter] = null;
275283
}
276284

277285
/**

0 commit comments

Comments
 (0)