mirror of
https://github.com/filamentphp/filament.git
synced 2026-09-24 15:42:09 +08:00
Update Select.php
This commit is contained in:
@@ -1089,7 +1089,7 @@ class Select extends Field implements Contracts\CanDisableOptions, Contracts\Has
|
||||
$query->where(function (Builder $query) use ($databaseConnection, $isForcedCaseInsensitive, $search): Builder {
|
||||
$isFirst = true;
|
||||
|
||||
foreach ($this->getSearchColumns() as $searchColumn) {
|
||||
foreach ($this->getSearchColumns() ?? [] as $searchColumn) {
|
||||
$whereClause = $isFirst ? 'where' : 'orWhere';
|
||||
|
||||
$query->{$whereClause}(
|
||||
@@ -1215,7 +1215,7 @@ class Select extends Field implements Contracts\CanDisableOptions, Contracts\Has
|
||||
|
||||
public function hasDynamicSearchResults(): bool
|
||||
{
|
||||
if ($this->hasRelationship() && blank($this->getRelationshipTitleAttribute()) && empty($this->searchColumns)) {
|
||||
if ($this->hasRelationship() && blank($this->getSearchColumns())) {
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user