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

turn zindex reactive #937

Merged
merged 4 commits into from
Apr 3, 2018

Conversation

lslv1243
Copy link
Contributor

@lslv1243 lslv1243 commented Apr 2, 2018

i was trying to set zindex on state update relative to the amount of modals opened and i noticed that it was not updating in the dom.

src/Modal.js Outdated
@@ -120,6 +120,10 @@ class Modal extends React.Component {
if (this.props.autoFocus && this.state.isOpen && !prevState.isOpen) {
this.setFocus();
}

if (prevProps.zIndex !== this.props.zIndex) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably also want to check to see if this._element exists. Also, it would be nice to add a test to ensure this functionality isn't lost in future changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

did what you asked

@TheSharpieOne TheSharpieOne merged commit 01667c1 into reactstrap:master Apr 3, 2018
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.

None yet

3 participants