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

<Icon /> does not support ref on its rendered <span /> #10941

Closed
quisido opened this issue Apr 5, 2018 · 1 comment
Closed

<Icon /> does not support ref on its rendered <span /> #10941

quisido opened this issue Apr 5, 2018 · 1 comment
Labels
support: question Community support but can be turned into an improvement

Comments

@quisido
Copy link
Contributor

quisido commented Apr 5, 2018

Expected Behavior

<Icon spanRef={myFunc} /> should let me grab the resultant span's DOM element (or null).

Current Behavior

No such property exists.

Context

Was wanting to create an Icon element that has a CSS opacity:0 and transition-property:opacity that immediately becomes CSS opacity:1 on render. However, there is no way to grab the Icon's span on render, currently, to manipulate it. I feel this could also apply to any other scenario besides my own.

@oliviertassinari oliviertassinari added the support: question Community support but can be turned into an improvement label Apr 6, 2018
@oliviertassinari
Copy link
Member

@CharlesStover Use the innerRef property. In the future, we will forward the ref to the root element: #10825. From your use case, I would rather be using the style property.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
support: question Community support but can be turned into an improvement
Projects
None yet
Development

No branches or pull requests

2 participants