Skip to content

using Unicorn.call in multiple child elements #657

Answered by jacksund
jacksund asked this question in Q&A
Discussion options

You must be logged in to vote

I think I found the solution. The first arg in Unicorn.call is componentNameOrKey:

export function call(componentNameOrKey, methodName, ...args) {

So you can call the child component as follows:

Unicorn.call('example_key', 'select_state', this.value, this.selectedIndex)

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@adamghill
Comment options

Answer selected by jacksund
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants