Skip to content

Commit

Permalink
values property will be considered while creating filters
Browse files Browse the repository at this point in the history
  • Loading branch information
sevannerse committed Mar 9, 2021
1 parent c06568f commit 1cd66a0
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/View/Components/SearchString.php
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ protected function isFilter($column, $options)
{
$filter = true;

if (empty($this->getFilterUrl($column, $options)) && (!isset($options['date']) && !isset($options['boolean']))) {
if (empty($this->getFilterUrl($column, $options)) && (!isset($options['date']) && !isset($options['boolean']) && !isset($options['values']))) {
$filter = false;
}

Expand Down Expand Up @@ -199,6 +199,10 @@ protected function getFilterValues($column, $options)
'value' => empty($options['translation']) ? trans('general.yes') : trans($options['translation'][1]),
],
];
} else if (isset($options['values'])) {
foreach ($options['values'] as $key => $value) {
$values[$key] = trans($value);
}
} else if ($search = request()->get('search', false)) {
$fields = explode(' ', $search);

Expand Down

0 comments on commit 1cd66a0

Please sign in to comment.