open Record URL from $table in new tab

Hello, i have a custom URL on a documents table
return $table
->recordUrl(fn ($record): string => $record->getUrl())
return $table
->recordUrl(fn ($record): string => $record->getUrl())
What is the right way to open the URL in a new tab? In the table index.blade is the
\Filament\Support\generate_href_html($recordUrl)
\Filament\Support\generate_href_html($recordUrl)
called, buth without parameters. Is it possible to implement this or maybe overrite the generate_href_html for now?
Solution:
hum.. The openUrlInNewTab method is available on table columns, TextColumn for example
->url(fn (Model $record): string => '...')
->openUrlInNewTab()
->url(fn (Model $record): string => '...')
->openUrlInNewTab()
...
Jump to solution
4 Replies
Solution
LeandroFerreira
LeandroFerreira10mo ago
hum.. The openUrlInNewTab method is available on table columns, TextColumn for example
->url(fn (Model $record): string => '...')
->openUrlInNewTab()
->url(fn (Model $record): string => '...')
->openUrlInNewTab()
BOT_Larry
BOT_LarryOP10mo ago
Hm i get
Method Filament\Tables\Table::openUrlInNewTab does not exist.
Method Filament\Tables\Table::openUrlInNewTab does not exist.
I am on filament 3.2.28
LeandroFerreira
LeandroFerreira10mo ago
on table columns, not table
BOT_Larry
BOT_LarryOP10mo ago
Ah so i have to implement a "open" button 🤔 Not so easy to modify the link for the whole row? (for ->recordUrl())
Want results from more Discord servers?
Add your server