Why does TextInput does not want to save value

Hi everyone i have a problem where mine textinput does not want to save the value i enter. This is how i made the textinput
public static function form(Form $form): Form
    {
        return $form
            ->schema(Project::getForm())->columns(1);
    }
  // admin panel form 
  public static function getForm():array
  {
      return [
          Tabs::make()->schema(Project::makeTabs()),

private static function makeTabs()
    {
        $tabs = [];
        $languages = Languages::cases();
        foreach($languages as $lang)
        {
            $tabs[] = Tab::make(Languages::getFullName($lang->name))
                ->schema([
                    TextInput::make("contents.{$lang->value}.title")
                        ->required()
                        ->maxLength(50)
                        ->afterStateHydrated(function (TextInput $component, $state, $record) use ($lang) {
                            if($record){
                                $content = $record->contents()->language($lang->value)->first();
                                $component->state($content->title ?? null);
                            }
                        })
Was this page helpful?