Pass columns to search scope

This allows the default search to be applied and combined with any custom constraints
This commit is contained in:
Samuel Georges 2016-11-29 06:46:52 +11:00
parent 6679aa6557
commit b39ebec812
1 changed files with 2 additions and 2 deletions

View File

@ -1181,8 +1181,8 @@ class Lists extends WidgetBase
if ($scopeMethod = $this->searchScope) {
$searchMethod = $boolean == 'and' ? 'where' : 'orWhere';
$query->$searchMethod(function($q) use ($term, $scopeMethod) {
$q->$scopeMethod($term);
$query->$searchMethod(function($q) use ($term, $columns, $scopeMethod) {
$q->$scopeMethod($term, $columns);
});
}
else {