F
Filamentβ€’4w ago
Rome

Open custom modal action on record click

I need to open a custom modal action on row click. I've tried in recordUrl() and in recordAction() with no luck.
Solution:
if you create a custom action, you should add in the table ```php $table ->recordUrl(null)...
Jump to solution
9 Replies
LeandroFerreira
LeandroFerreiraβ€’4w ago
Did you add a row action in the table?
Rome
Romeβ€’4w ago
What do you mean with row action? Right now I have an action to open a custom modal, but I need to open it when i click on the row and not on the button.
LeandroFerreira
LeandroFerreiraβ€’4w ago
Could you share your action?
Rome
Romeβ€’4w ago
Tables\Actions\Action::make('Test') ->modalContent(fn (Model $record): View => view( 'filament.pages.elemento-ventas', ['ventas' => $record->pivot->ventas], )),
Solution
LeandroFerreira
LeandroFerreiraβ€’4w ago
if you create a custom action, you should add in the table
$table
->recordUrl(null)
->recordAction('yourActionName')
$table
->recordUrl(null)
->recordAction('yourActionName')
LeandroFerreira
LeandroFerreiraβ€’4w ago
$table
->recordUrl(null)
->recordAction('Test')
$table
->recordUrl(null)
->recordAction('Test')
Rome
Romeβ€’4w ago
Ohh nice!! Its working So to make it work, I need to have the action in the row? I can not hide it?
LeandroFerreira
LeandroFerreiraβ€’4w ago
yes, this is a row action πŸ˜€
Rome
Romeβ€’4w ago
Well, atleast I can hide it in the action group Thanks a lot Leandro!
Want results from more Discord servers?
Add your server
More Posts
Query string on simple resource modalsIs there a built-in way to fill the query string when the modal of a simple resource is open, so thaFilament Blade Components in non-filament frontendI did add @FilamentStyles and @FilamentScripts to my layout, I have everything set in vite.config.jsExporter MaxRows check earlyIs it possible to make the MaxRows() check in the export action check sooner? I have a very large tIs it possible to create a Filament settings page with a tabbed form, for multiple settings groups?I have created a few Filament Spatie Settings pages, but I feel like this quickly gets overwhelming Filament Performance Issue: Slow Response Time with SQL ServerI'm using Filament with SQL Server as my database. I'm experiencing intermittent performance issues Select form not retrieving data using getSearchResultsUsing()I am using dependent selection using getSearchResultsUsing(). I am in Coupon record creation using Aggregating relationships use two sums and calculate the percentage.I have two columns working for the Aggregating Relation but I don't see how to use the results in a export groups from tableHi I was I have a table that groups items to display a summary. I was wondering if it is possible toOpen the column visibility dropdown in the slideOverHi devs, is it possible to open a dropdown in a slideOver, similar to filters? https://filamentphp.How to route to a page with a given filter?Currently I have a resource with a relation resource. Those relation resource records should get a u