Skip to content

Commit

Permalink
Fixes #16
Browse files Browse the repository at this point in the history
  • Loading branch information
afonic committed Feb 28, 2024
1 parent c727d2d commit 7b741ec
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/Http/Livewire/LfCheckboxFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,8 @@ public function rules()
#[On('preset-params')]
public function setPresetSort($params)
{
$this->dispatchFilterMounted();

if (array_key_exists($this->getParamKey(), $params)) {
$this->selected = explode('|', $params[$this->getParamKey()]);
$this->previousSelected = $this->selected;
Expand Down
2 changes: 2 additions & 0 deletions src/Http/Livewire/LfDateFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ public function clear()
#[On('preset-params')]
public function setPresetSort($params)
{
$this->dispatchFilterMounted();

if (array_key_exists($this->getParamKey(), $params)) {
$this->selected = $params[$this->getParamKey()];
}
Expand Down
2 changes: 2 additions & 0 deletions src/Http/Livewire/LfRadioFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ public function rules()
#[On('preset-params')]
public function setPresetSort($params)
{
$this->dispatchFilterMounted();

if (array_key_exists($this->getParamKey(), $params)) {
$this->selected = $params[$this->getParamKey()];
}
Expand Down
2 changes: 2 additions & 0 deletions src/Http/Livewire/LfRangeFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,8 @@ public function livewireComponentReady()
#[On('preset-params')]
public function setPresetSort($params)
{
$this->dispatchFilterMounted();

if (array_key_exists($this->getParamKey(), $params)) {
$this->selected = $params[$this->getParamKey()];
}
Expand Down
2 changes: 2 additions & 0 deletions src/Http/Livewire/LfTextFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,8 @@ public function clear()
#[On('preset-params')]
public function setPresetSort($params)
{
$this->dispatchFilterMounted();

if (array_key_exists($this->getParamKey(), $params)) {
$this->selected = $params[$this->getParamKey()];
}
Expand Down

0 comments on commit 7b741ec

Please sign in to comment.