default value in custom page

Hi , how to add default value for textInput in custom page ? I try to use afterStateHydrated still not working.

class AddBudgetPlanner extends Page implements HasForms
{
    use InteractsWithForms, InteractsWithActions, HasPageSidebar;

    protected static string $resource = BranchResource::class;
    protected static string $view = 'filament.resources.branch-resource.pages.create-budget-planner';
    public Branch $record;
    protected static ?string $model = Branch::class;

    public function getBreadcrumb(): ?string
    {
        return __('Manage Branch Budget Planner');
    }

    public function form(Form $form): Form
    {
        return $form->schema([
            TextInput::make('code')->afterStateHydrated(fn(TextInput $component) => $component->state('heloss'))
        ]);
    }
Was this page helpful?