Hello,
The ViewAction redirects to the view page when I click on it from the listing page.
But when I use it in a BaseWidget context, it opens an empty modal. While I would like to be redirected too.
Here is my OfferTable:
class OfferTable
{
public static function configure(Table $table): Table
{
return $table
->columns(self::getColumns())
->recordActions(self::getRecordActions());
}
public static function getRecordActions(): array
{
return [
ViewAction::make(),
EditAction::make(),
];
}
// ...
}
Here is my widget:
<?php
namespace App\Filament\Widgets\Tables;
class LatestOffers extends BaseWidget
{
protected static bool $isLazy = false;
public function table(Table $table): Table
{
$query = OfferResource::getEloquentQuery();
$actions = OfferTable::getRecordActions();
$columns = OfferTable::getColumns();
return $table
->query($query)
->recordActions($actions)
->columns($columns);
}
}
I would have liked to reuse the getRecordActions function... Am I forced to define an Action::make()->url(...)?
Thanks for your help!!