F
Filament2y ago
Mdk

Setting recordUrl(null) on a table that has an EditAction among its action doesn't disable the click

I haven't had time to fully test this, but my scenario is this:
$table
[..]
->actions([
Tables\Actions\Action::make('view product')
->label('Vedi prodotto')
->url(fn (Watchlist $record): string => ProductResource::getUrl('view', ['record' => $record->product_id]))
->color('gray')
->icon('heroicon-s-eye'),
Tables\Actions\EditAction::make(),
])
$table
[..]
->actions([
Tables\Actions\Action::make('view product')
->label('Vedi prodotto')
->url(fn (Watchlist $record): string => ProductResource::getUrl('view', ['record' => $record->product_id]))
->color('gray')
->icon('heroicon-s-eye'),
Tables\Actions\EditAction::make(),
])
I wanted to disabled the row click, but using ->recordUrl(null) doesn't work, UNLESS i remove the EditAction as well (the custom action doesn't seem to have any influence in all of this) Is this an expected behaviour? I want to keep the edit action in the last column while not giving the user the option to click the whole row
Solution:
Not sure, but have you tried ->recordAction(null) ?
Jump to solution
2 Replies
Solution
Patrick Boivin
Not sure, but have you tried ->recordAction(null) ?
Mdk
MdkOP2y ago
ok, that one works, not sure why using just recordUrl worked fine on another table that didn't have any action but still opened the edit page when clicking it (before adding that) Thanks!

Did you find this page helpful?