Action button not working on first click

Hello, fellow devs! I've added a Filament Action named Link Payment to my filament table. When I click on it, it opens a Livewire modal. Inside this modal, there's another action called Create Contact, but I'm facing an issue. The first time I click "Create Contact", it doesn't work, but the second time it does. The same issue occurs with another action on the page. I've also implemented search functionality, and after a search, the action works on the first click. The problem arises only when the page loads; I have to click twice. After that, if I close the modal and reopen it, it works normally. Also as you can see in the video (end part), if I click on the Create Contact button first and then click on the link icon action next, it opens the Create Contact functionality. I've shared a video of the issue and the code link below: Code: https://gist.github.com/dushmanta05/f325536e88d3e568bec2c16ff8eb4b4c Flow of the code: - I have an OrphanPayments.php filament widget file. It contains a payment table with an action named Link Payment. - Clicking on Link Payment opens a modal written in Livewire (PaymentSearchRenderHelper.php file) with its corresponding view file as payment-search-render-helper.blade.php. - The Livewire file mentioned above sends the data to another Livewire file PreviewPaymentContactSearch.php along with preview-payment-contact-search.blade.php as its corresponding blade file. - The issue occurs in PreviewPaymentContactSearch.php where the Create Contact Action lies. Note: - I've tried using dd() and it works on the first click. - I also tried using the updating() lifecycle hook of Livewire, but it works on the second click, not the first. I would appreciate any help regarding this issue. Thank you for your valuable time. If more information required, please feel free to reply in the comments. Thank you again.
Gist
Orphan Payment Link
Orphan Payment Link. GitHub Gist: instantly share code, notes, and snippets.
5 Replies
technocrat
technocrat3mo ago
having same kind of issue. Anybody?
Mikey
Mikey3mo ago
Yeah, same thing, the request is sent but client ignores it. Fixed it by not using nested actions, instead I use action to display first modal and for the second modal I use blade component instead (https://filamentphp.com/docs/3.x/support/blade-components/modal). It's not ideal, but at the very least it works.
sandofgods
sandofgods3mo ago
it's a bug listed in filament github
Dushmanta
Dushmanta3mo ago
Noted and thanks for your response Cool! but I think we've to use nested action cause the 2nd action comes to picture after the 1st being clicked 😦
TNDJXD
TNDJXD3mo ago
@sandofgods Do you have a link to the issue? I would like to track this.