Closed NaungYeHtet closed 10 months ago
Forms\Components\Select::make('company_city_id') ->relationship('city', 'name') ->getOptionLabelFromRecordUsing(fn (Model $record) => "{$record->getTranslation('name', app()->getLocale())}") ->preload() ->searchable() ->required(), Is it what you need?
Or even ->getOptionLabelFromRecordUsing(fn (Model $record) => $record->name)
Package
filament/spatie-laravel-translatable-plugin
Package Version
3.0.0
Laravel Version
10.10
Livewire Version
No response
PHP Version
8.1
Problem description
recordSelect field of AttachAction cannot translate.
Expected behavior
AttachAction can translate
Steps to reproduce
Use RelationManager AttachAction and
filament/spatie-laravel-translatable-plugin
Reproduction repository
https://github.com/NaungYeHtet/filament-naungyehtet
Relevant log output
No response