Β© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
FilamentF
Filamentβ€’2y agoβ€’
3 replies
d3v1anX

how to open edit modal from link?

hey guys,

I implemented a filament table into a livewire component. On it there is a edit modal for each entry.
Now I want to create a link on another page to this table, which opens the edit modal for an entry directly.

I tried so many things like "&id=XXX" and checking in mount of livewire if request()->has('id') -> then try to "mountTableAction('edit', XXX)" but this will not work because Table is not initalized on mount.

Then I tried to call with a direct link to "action=edit" like you can do with "action=create", but this won't work with integrating in livewire.

Now I'm struggeling with some kind of Javascript to $wire.call('mountTableAction'...) but this also does not work and I think it surely can be easier.. πŸ˜„

Has anyone an idea how I can call the edit modal for a record after loading the table?
Solution
I solved it by myself:

<div @if(request()->has('id')) x-data="{}"
    x-init="$wire.$dispatch('openModal', [{{ request()->id }}])"
    @endif
>
<div @if(request()->has('id')) x-data="{}"
    x-init="$wire.$dispatch('openModal', [{{ request()->id }}])"
    @endif
>


and

#[On('openModal')]
public function openModal($entry)
{
   $this->mountTableAction('edit', $entry);
}
#[On('openModal')]
public function openModal($entry)
{
   $this->mountTableAction('edit', $entry);
}


Maybe there is a better solution, but it works πŸ˜„
Jump to solution
Filament banner
FilamentJoin
A powerful open source UI framework for Laravel β€’ Build and ship admin panels & apps fast with Livewire
20,307Members
Resources
Was this page helpful?

Similar Threads

Recent Announcements

Similar Threads

Open Edit modal from Action Group
FilamentFFilament / β“β”Šhelp
2y ago
Open modal from edit table action
FilamentFFilament / β“β”Šhelp
3y ago
Custom Page: open modal from link
FilamentFFilament / β“β”Šhelp
3y ago
Extra modal actions, trigger edit modal action and open link
FilamentFFilament / β“β”Šhelp
3y ago