Using $get / $set with a Livewire::make() form component
I am desperately trying to create a modal with a select component that, when changed, can display some calculated things in the modal based on the selected amount.
This works to pass the default state of amount from coverage_amount, but amount doesn't change when the select field changes.
How can I access the current state of
This works to pass the default state of amount from coverage_amount, but amount doesn't change when the select field changes.
How can I access the current state of
coverage_amount inside the PolicyPreview livewire component?Solution
You could use a ViewField
And use afterStateUpdated in the select to set the value
And use afterStateUpdated in the select to set the value