Closed flatcapco closed 1 month ago
It tries to invoke a method that exists on your current component. I don't even know if Livewire allows you to invoke a function from another place.
Try this ... Livewire expects myFunction
to be present on your current component . Am I wrong?
<buttton wire:click="myFunction">test</button>
I'll see if I can find any best practises on the livewire discord - but I've got a feeling you're right it just seems a shame to have access to a Form but not be able to group all the shared logic
When using a Livewire Form and the Choices field, it would be nice if we could place all the associated methods within the livewire form.
The options field works as expected, but because the search-function expects a string it doesn't resolve to the correct method if "searchFromAddress" is within a form
This would allow the only part of the forms customisation to simply be the fields and keeps the parent component cleaner
Thanks