Skip to content

Commit

Permalink
Merge pull request #35 from KonnectIT/search_with_pagination
Browse files Browse the repository at this point in the history
Reset page while entering new search
  • Loading branch information
luanfreitasdev authored Jul 31, 2021
2 parents d3a2f3e + 2d2a90c commit 5b112a1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Traits/Filter.php
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ public function filterNumberStart(string $field, string $value, string $thousand
$this->filters['number'][$field]['start'] = $value;
$this->filters['number'][$field]['thousands'] = $thousands;
$this->filters['number'][$field]['decimal'] = $decimal;

$this->resetPage();
}

/**
Expand All @@ -83,6 +85,8 @@ public function filterNumberEnd(string $field, string $value, string $thousands,
$this->filters['number'][$field]['end'] = $value;
$this->filters['number'][$field]['thousands'] = $thousands;
$this->filters['number'][$field]['decimal'] = $decimal;

$this->resetPage();
}

/**
Expand All @@ -92,6 +96,8 @@ public function filterNumberEnd(string $field, string $value, string $thousands,
public function filterInputText(string $field, string $value): void
{
$this->filters['input_text'][$field] = $value;

$this->resetPage();
}

/**
Expand All @@ -101,6 +107,8 @@ public function filterInputText(string $field, string $value): void
public function filterBoolean(string $field, string $value): void
{
$this->filters['boolean'][$field] = $value;

$this->resetPage();
}

/**
Expand All @@ -110,5 +118,7 @@ public function filterBoolean(string $field, string $value): void
public function filterInputTextOptions(string $field, string $value): void
{
$this->filters['input_text_options'][$field] = $value;

$this->resetPage();
}
}

0 comments on commit 5b112a1

Please sign in to comment.