Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to get the ref of a custom component in parent component? #19

Open
freewind opened this issue Feb 24, 2015 · 1 comment
Open

How to get the ref of a custom component in parent component? #19

freewind opened this issue Feb 24, 2015 · 1 comment

Comments

@freewind
Copy link

Say I have two custom components, one has a button, other one has a link.

When I click on the button, I want to the link of another component be clicked.

If I can get the DOM of the link from the button component, I can easily do:

linkNode.click()

But in my case, I can't find a way to get the ref of the link in the button component. If I use pure reactjs, I can do:

refs('linkComponent').refs('link').getDOMNode().click()

But how to do the same with scala-js-react?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant