Open Modal through URL
I have a table of documents that need reviewed and when opened, they open in a slideover. Emails are sent out that a new document needs reviewed. Id love to be able to trigger the table row Action that launches the form modal through a url. Suggestions for doing this? Do I simply look for a particular request() and use emit? Not sure on how i would trigger the Action though.
6 Replies
unfortunately livewire doenst make it easy, since you cant dispatch browser events from mount()
ah yes, i always forget that
the only way you could do it is through a wire:init hack
wire:init="mountAction('name')"
but it has to be in the htmli might consider that. not admin panel related, so a bit easier to modify that
ok, so im partly there, can i actually launch a table action like so? right now its saying its null. Ive verified $record is the same format as its found in when click on the actual action. Just getting null on the $record when i try to pass it in my first code
I think mountTableAction() needs a record key as a string for the second param.
Example v2 usage https://github.com/filamentphp/filament/blob/2.x/packages/tables/resources/views/components/actions/action.blade.php
GitHub
filament/action.blade.php at 2.x · filamentphp/filament
Admin panel, form builder and table builder for Laravel. Built with the TALL stack. Designed for humans. - filament/action.blade.php at 2.x · filamentphp/filament