-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Can't get access to ref on Transition.Child or Transition #273
Comments
Facing a similar issue |
This is extremely necessary. |
Possible solutions:
Transition and Transition.Child both expose their ref like that. See e.g. the UI Docs for further reference. |
Going to comment on this real quick, because in the latest version (in develop branch) this is not the case anymore, because we now have the same API for every component. That said, I'll make sure that every component will be able to expose a ref to the underlying DOM node if it makes sense! |
@RobinMalfait What's the status of exposing refs for every component? I'm hoping that I'll be able to pass a |
This should be fixed by #1116, and will be available in the next release. You can already try it using:
|
|
@ARkrOSClou create a new issue with a minimal reproduction CodeSandbox / repo attached. |
same error 😢 |
I'm trying to make a modal utility in React, and I wаnt to add code that allows clicking outside of the modal.
What I wanted to do was attach a ref to my child so that I can detect whether or not the user has clicked outside the modal. This is however not possible, and I think it should be, as the
<Transition.Child>
creates adiv
for me. I'd like to be able to referece that div:This doesn't work, because
Transition.Child
andTransition
components don't forward refs to the div.The text was updated successfully, but these errors were encountered: