how to use livewire componet as a custom modalContent

I’m using a Livewire component as the content of a Filament modal (modalContent). Specifically, I’m embedding the Livewire component inside a Blade view, and then passing that view to modalContent(). The problem is: when I click the form submit button inside my Livewire component, it does not trigger the create method in the Livewire component class. Instead, the submission gets intercepted by the Filament modal’s action handler (the ->action() method defined on the modal).
8 Replies
siraj
sirajOP4w ago
You are correct, but I also need to display additional content besides the form. For example, when a user selects a product from the select input, I want to display the product details on the left side
igorclauss
igorclauss4w ago
Check the docs you can render a custom view in the modal content.
flashman
flashman2w ago
@siraj I have the same problem, have you solved it? I need livewire component inside blade, but that component has multiple forms, or infolists
Dennis Koch
Dennis Koch2w ago
You can just render a Livewire components inside a blade view.
flashman
flashman2w ago
Hi. I did rendered Livewire component inside blade view. Also I added HasSchema interface to Livewire component and added form with submit action. But when I submit form in Livewire component, Action modal (Filament) is closed.
Dennis Koch
Dennis Koch2w ago
Maybe open a new thread and provide some code I see you already did
flashman
flashman2w ago

Did you find this page helpful?