ChandraAT
ChandraAT
FFilament
Created by ChandraAT on 4/10/2024 in #❓┊help
Rerender Header Actions Button With Value From Query String
what I am trying to do: I try to keep the step of wizard from view page and when user click the edit action in header the user will automatically in same wizard step What I did: 1. Add this method to the wizard ->persistStepInQueryString() https://filamentphp.com/docs/3.x/forms/layout/wizard#persisting-the-current-step-in-the-urls-query-string 2. Pass the value of the step into url in EditButton My Issue: The url of the button seems not updated when I change the steps in wizard although the queryString is updated Code:
Wizard::make(ProjectForms::getSteps())
->columnSpanFull()
->skippable(true)
->persistStepInQueryString(),
Wizard::make(ProjectForms::getSteps())
->columnSpanFull()
->skippable(true)
->persistStepInQueryString(),
View Page
public string $step = 'step-1';

public $queryString = [
'activeTab',
'step'
];

protected function getHeaderActions(): array
{
return [
Actions\EditAction::make()
->url(fn ($record) => ProjectResource::getUrl('edit', [
'record' => $record->id,
'step' => $this->step;
])),
Actions\DeleteAction::make(),
CommentsAction::make(),
];
}
public string $step = 'step-1';

public $queryString = [
'activeTab',
'step'
];

protected function getHeaderActions(): array
{
return [
Actions\EditAction::make()
->url(fn ($record) => ProjectResource::getUrl('edit', [
'record' => $record->id,
'step' => $this->step;
])),
Actions\DeleteAction::make(),
CommentsAction::make(),
];
}
2 replies
FFilament
Created by ChandraAT on 2/21/2024 in #❓┊help
Upgrade Error From V2 to V3.2
No description
3 replies