mirror of
https://github.com/AnimeThemes/animethemes-server.git
synced 2026-07-11 01:24:46 +02:00
fix(filament): fix option label when model doesnt use scout (#1142)
This commit is contained in:
@@ -4,6 +4,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace App\Filament\Components\Fields;
|
||||
|
||||
use App\Contracts\Models\Nameable;
|
||||
use App\Filament\RelationManagers\BaseRelationManager;
|
||||
use App\Search\Criteria;
|
||||
use App\Search\Search;
|
||||
@@ -48,7 +49,8 @@ class Select extends ComponentsSelect
|
||||
);
|
||||
}
|
||||
|
||||
return $this->searchable();
|
||||
return $this->searchable()
|
||||
->getOptionLabelUsing(fn (Model&Nameable $record) => $record->getName());
|
||||
}
|
||||
|
||||
public function escapeReservedChars(string $search): string
|
||||
|
||||
Reference in New Issue
Block a user