Heading value

I have a custom page: protected ?string $heading = null; class ProjectStepper extends Page public function mount($recordId): void { $this->record= Project::findOrFail($recordId); $this->heading = $this->record->name; } Here it correctly assigns the title dynamically; but, when I try to perform the following action: protected function getHeaderActions(): array { return [
Action::make('create') ->icon('heroicon-c-plus') ->color('graydark') ->label('Nueva Tarea') // ->url(TaskResource::getUrl('create', ['project_id' => $this->record->id, 'title' => 'Nueva Tarea'])) ->form([ TextInput::make('title') ->label('Título') ->placeholder('Título de la Tarea') ->required(), TextInput::make('project_id') ->label('Proyecto') ->default($this->record->id) ->placeholder('ID del Proyecto') ->required(), ]) ->openUrlinNewTab(),

]; } the value of $heading is "reset"
0 Replies
No replies yetBe the first to reply to this messageJoin

Did you find this page helpful?