Skip to content

Commit

Permalink
open modal when it is initially set to true
Browse files Browse the repository at this point in the history
  • Loading branch information
cenkakin committed Jan 10, 2017
1 parent df8d5f8 commit a6093ea
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ class Modal extends Component {
offset: new Animated.Value(0)
};
}
componentWillMount() {
if (this.props.open) {
this.open();
}
}
componentWillReceiveProps(props) {
if (props.open && props.children !== this.state.children) {
this.setState({children: props.children});
Expand Down

0 comments on commit a6093ea

Please sign in to comment.