Pass columns to search scope
This allows the default search to be applied and combined with any custom constraints
This commit is contained in:
parent
6679aa6557
commit
b39ebec812
|
|
@ -1181,8 +1181,8 @@ class Lists extends WidgetBase
|
||||||
|
|
||||||
if ($scopeMethod = $this->searchScope) {
|
if ($scopeMethod = $this->searchScope) {
|
||||||
$searchMethod = $boolean == 'and' ? 'where' : 'orWhere';
|
$searchMethod = $boolean == 'and' ? 'where' : 'orWhere';
|
||||||
$query->$searchMethod(function($q) use ($term, $scopeMethod) {
|
$query->$searchMethod(function($q) use ($term, $columns, $scopeMethod) {
|
||||||
$q->$scopeMethod($term);
|
$q->$scopeMethod($term, $columns);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue