State not updating

                        Forms\Components\TextInput::make('title')
                            ->label("Title ($locale->locale)")
                            ->required()
                            ->maxLength(100)
                            ->afterStateHydrated(function (Forms\Components\TextInput $component, $record) use ($locale) {
                                return $component->state($record->locales()->where('locales_offer.locale', $locale->locale)->first()->pivot->title ?? $record->title);
                            })
                            ->live()
                            ->key('title'),


So I have this grid thats inside a tab component. When I switch component, it should update the input value. But the content is not currently changing.

If I dd($component->state); the field doesn't exist, but dd component does show the TextInput element
Was this page helpful?