Skip to content

Commit

Permalink
Fix for setFilter (#1449)
Browse files Browse the repository at this point in the history
* Fix for setFilter

* Update return types
---------

Co-authored-by: lrljoe <[email protected]>
  • Loading branch information
lrljoe and lrljoe authored Oct 25, 2023
1 parent 2e14794 commit cbbb283
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
All notable changes to `laravel-livewire-tables` will be documented in this file

## UNRELEASED
- Fix for setFilter (allowing setFilter at boot/mount)

## [3.0.0-beta.7] - 2023-10-25
- Add wire:navigate option for clickable rows

## [3.0.0-beta.6] - 2023-10-25
Expand Down
8 changes: 2 additions & 6 deletions src/Traits/Helpers/FilterHelpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,10 @@ public function getFilterByKey(string $key)
});
}

/**
* @param mixed $value
* @return mixed
*/
#[On('set-filter')]
public function setFilter(string $filterKey, $value)
public function setFilter(string $filterKey, mixed $value): void
{
return $this->filterComponents[$filterKey] = $value;
$this->appliedFilters[$filterKey] = $this->filterComponents[$filterKey] = $value;
}

public function selectAllFilterOptions(string $filterKey): void
Expand Down

0 comments on commit cbbb283

Please sign in to comment.