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(),


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(),
        ];
    }
Was this page helpful?