F
Filament4mo ago
o.m

Why doesnt livewire:click work on modal?

I have a modal and I button calls a function text-messages-content.blade.php
<button wire:click="test" type="button" class="btn btn-secondary">Schedule Text Message</button>
<button wire:click="test" type="button" class="btn btn-secondary">Schedule Text Message</button>
TextMessagesContent::class
public function test()
{
dd("test");
}
public function test()
{
dd("test");
}
nothing happens when I click on the button
5 Replies
o.m
o.mOP4mo ago
No description
brainbarett
brainbarett4mo ago
could you please share more about how you're setting up this modal and the TextMessagesContent class? or if there are any errors in the developer console? if TextMessagesContent is a livewire component, and text-messages-content.blade.php looks something like this:
<x-filament::modal id="my-id">

<button wire:click="test" type="button" class="btn btn-secondary">Schedule Text Message</button>

</x-filament::modal>
<x-filament::modal id="my-id">

<button wire:click="test" type="button" class="btn btn-secondary">Schedule Text Message</button>

</x-filament::modal>
then there is no reason why it wouldnt be working
o.m
o.mOP4mo ago
is not called like x-filament actually i am just usinga livewire component in here
Dennis Koch
Dennis Koch4mo ago
Please share some more code.
o.m
o.mOP4mo ago
Sorry it seems that the main issue of this component was that I have 2 roots, ones a style and ones a div. This helped me fix the issue.

Did you find this page helpful?