arnaudsf
Closure on select options strange behavior
Hello,
I don't know how to explain it properly but I have an header table action in my RelationManager.
Inside I have a form with a select. If in the options of the select I pass an array :
Or
Then I submit the form, it saves and refresh the table.
BUT
If I pass a closure to the options field, like :
Even without change my query, the table won't refresh.
Any idea ?
3 replies
test select action inside modal
In my LeadResource, on the ListRecord page, I have a "Create" action that opens a form modal to create a new lead.
The form includes a select field with an action to create a new customer on the fly. When the user creates a customer, the customer ID should be associated with the new lead. I'm trying to write a test to verify:
- 1/ The new customer is created successfully.
- 2/ The ID of the newly created customer matches the one associated with the newly created lead.
Here’s what I have so far for testing the lead creation:
Now, I want to test the nested action for creating a customer. I’ve attempted this:
`
However, I’m struggling with the following:
- 1/ How to properly test the createCustomer action within the context of the "Create" action?
- 2/ How to assert that the new customer's ID is correctly associated with the newly created lead?
Any suggestions or examples for testing nested actions in Livewire?
Thanks in advance for your help!
3 replies