FilamentF
Filament6mo 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;
                                            }),

but in that way the $livewire->activeLocale; is not updated when the language change on the switcher. What am I doing wrong here?
ty
Was this page helpful?