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

Accessing a 'ref' element after the modal is opened #15

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Accessing a 'ref' element after the modal is opened #15

wants to merge 2 commits into from

Conversation

leonascimento
Copy link

Hello Guys I needed to run a function after the component is mounted. I think this feature usable.

@aij
Copy link

aij commented Apr 12, 2016

When would that be useful? Couldn't you just define componentDidMount on your wrapper or child components?

@diasbruno
Copy link

@aij It seems that when the open callback is called, we can access the 'refs' inside the modal.
reactjs/react-modal#154

@diasbruno
Copy link

I think the title of this issue is wrong.
@leonascimento can you update it?

@leonascimento
Copy link
Author

I updated the pull request with an example...
@aij I wrote this title wrong. Indeed I need to access a ref element after the modal is open!
Above this link has a comment on the lines 54, 60, 71.
https://plnkr.co/edit/h8SCXCNnpc8wWmoCif5m

@leonascimento leonascimento changed the title Running a function after the modal is mounted Accessing a 'ref' element after the modal when is opened Apr 13, 2016
@leonascimento leonascimento changed the title Accessing a 'ref' element after the modal when is opened Accessing a 'ref' element after the modal is opened Apr 13, 2016
studiogaram added a commit to studiogaram/react-kanban that referenced this pull request May 27, 2016
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

Successfully merging this pull request may close these issues.

3 participants