Skip to content

Use State to trigger open & close #2

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

Closed
wants to merge 2 commits into from

Conversation

tazsingh
Copy link

@tazsingh tazsingh commented Oct 3, 2014

I've found that handleProps is called for each render of the parent container. This up calling close and thereby creating warnings in my console due to https://github.com/rackt/react-modal/blob/master/lib/helpers/focusManager.js#L36

What I've done is update the component to use its state to keep track of whether it's open or not. This fixes the warnings but may not be the most elegant solution to the problem.

I've found that `handleProps` is called for each render of the parent container. This up calling `close` and thereby creating warnings in my console due to https://github.com/rackt/react-modal/blob/master/lib/helpers/focusManager.js#L36

What I've done is update the component to use its `state` to keep track of whether it's open or not. This fixes the warnings but may not be the most elegant solution to the problem.
…tch-1

Conflicts:
	lib/components/ModalPortal.js
@mzabriskie
Copy link
Member

@tazsingh I believe that this has already been resolved in version 0.0.6. Please update and let me know if the warnings still occur.

@mzabriskie mzabriskie closed this Mar 24, 2015
diasbruno added a commit that referenced this pull request Jun 20, 2017
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.

2 participants