createOptionUsing on select not called in livewire component
Hey guys,
I tried to add a form to a livewire component which works really well.
Now I created a select field (Tag) with a relationship with the option to add a new Tag.
I created "createOptionForm" on the select which is working fine and I wanted to include a logic, that it returns firstOrCreate on that creation.
I added "createOptionUsing" as well, but unfortunately this method is not called somehow. I don't know why this is not working.. :/
Has someone an idea?
My code:
blade:
Solution:Jump to solution
found the problem:
->relationship has much functions inside - including createOptionUsing, which overwrites my own function.
placing "->relationship" on top of "->createOptionUsing" works.. 😄...
6 Replies
Does the modal open?
yes, it opens
hum, it is multiple
Solution
found the problem:
->relationship has much functions inside - including createOptionUsing, which overwrites my own function.
placing "->relationship" on top of "->createOptionUsing" works.. 😄
hum, good catch!
thanks for your trying to help @Leandro Ferreira 🙂