How to dispatch filament form data using blade $dispatch method
When I am trying to
$dispatch
an event to send filament form data, it is not sending updated form data. However If use dispatch inside livewire component I am able to get updated data. But by calling dispatch in livewire component will result in server call. I am trying to avoid server call.
This is not send updated data:
However this is sending correct data:
Please let me know if there is a way to send updated form data from blade file itself to avoid server roundtrip.2 Replies
A Livewire event is used to communicate between different components. Are you sure you need it?
I’m curious why you want to use
$dispatch
if it will ultimately result in a network request.I have a custom field where user can select multiple multiple jobs from list of jobs, as list can be long so I am showing that list in a model and when user selects all interested jobs I dispatches all selected jobs back to custom field’s state where I listen for event ‘jobsupdated’ , I want to use browser event $dispatch instead of livewire $dispatch to avoid server roundtrip.