Open View Action in new tab?

Clicking view should redirect to another tab.
No description
5 Replies
Tieme
Tieme10mo ago
Antoher tab or page? And if it opens in modal, you possiblebly do not have the view page
wolfyandrew
wolfyandrewOP10mo ago
@Tieme It's the existing view page, I cannot use modal or slideover because my view page has a relation table, I just want to go to _blank page when clicking the view.
Tieme
Tieme10mo ago
See https://filamentphp.com/docs/3.x/actions/advanced#action-utility-injection
Action::make('edit')
->label('Edit post')
->url(fn (): string => route('posts.edit', ['post' => $this->post]))
->shouldOpenUrlInNewTab()
Action::make('edit')
->label('Edit post')
->url(fn (): string => route('posts.edit', ['post' => $this->post]))
->shouldOpenUrlInNewTab()
wolfyandrew
wolfyandrewOP10mo ago
Thank you!! @Tieme
Want results from more Discord servers?
Add your server