grouped actions not working after downloading file until page is refreshed

I have this download action:

public function downloadAction()
{
return Action::make('download')
->record($this->item)
->hidden($this->isDirectory)
->action(function () {
return redirect($this->item->download());
});
}

public function downloadAction()
{
return Action::make('download')
->record($this->item)
->hidden($this->isDirectory)
->action(function () {
return redirect($this->item->download());
});
}
$this->item->download() is getting a temporaryUrl from the storage facade and returning it. It works fine. I have an edit and a delete action that are all a part of this action group. All the actions work fine independently. Additionally, doing the edit action followed by the download action works fine. But doing the download action followed by the edit action produces a modal that looks like the attached screenshot. The header of the modal says Download even though I've clicked the edit button in the action group. Once I refresh the page, everything works as expected. Is there some kind of refresh I need to do after downloading, or do I need to handle the download differently? Both $this->item and $this->isDirectory are set in the mount method, so I'm not sure if that could be messing it up if it's re-rendering and no longer has the $this->item set.
No description
0 Replies
No replies yetBe the first to reply to this messageJoin