-
I have a form that uses a select2 dropdown menu, where this menu is within a child element. So my setup is essentially the doc's example with multiple-children plus the ignore-elements when editing one row (specifically one column in table will have a select2 element). How do I pass the key to Unicorn.call('row', 'example_key', 'select_state', this.value, this.selectedIndex) Or is passing the key not necessary? |
Beta Was this translation helpful? Give feedback.
Answered by
jacksund
Feb 15, 2024
Replies: 1 comment 1 reply
-
I think I found the solution. The first arg in So you can call the child component as follows: Unicorn.call('example_key', 'select_state', this.value, this.selectedIndex) |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
jacksund
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I think I found the solution. The first arg in
Unicorn.call
iscomponentNameOrKey
:django-unicorn/django_unicorn/static/unicorn/js/unicorn.js
Line 130 in dca4676
So you can call the child component as follows: