F
Filament4mo ago
lbar

Translatable language switcher reactive status

On a field I like to have the actual language set via language switcher, something like:
Forms\Components\TextInput::make('sharing_link')
->hiddenLabel()
->live()
->formatStateUsing(function ($record, $livewire) {
return $record->id . ' ' . $livewire->activeLocale;
}),
Forms\Components\TextInput::make('sharing_link')
->hiddenLabel()
->live()
->formatStateUsing(function ($record, $livewire) {
return $record->id . ' ' . $livewire->activeLocale;
}),
but in that way the $livewire->activeLocale; is not updated when the language change on the switcher. What am I doing wrong here? ty
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?