Reactive Fields
I've got two fields, purchase order and vendor. A purchase order object also has a vendor attached to it. I want it so that if the user selects a purchase order, it automatically selects the vendor and disables the field. If the purchase order gets unselected, the vendor field is cleared and enabled.
Solution:Jump to solution
make the fileds
->live()
and put the logic inside the ->disabled(fn(Get $get)=> !$get('purchase_order_id'))
3 Replies
Solution
make the fileds
->live()
and put the logic inside the ->disabled(fn(Get $get)=> !$get('purchase_order_id'))
you may implement more logic with
->afterStateUpdated()