Skip to content

Commit

Permalink
example displaying bug
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanflorence committed Nov 10, 2014
1 parent 31c160d commit 07541b3
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion examples/basic/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ var App = React.createClass({
this.setState({modalIsOpen: false});
},

handleInputChange: function() {
this.setState({foo: 'bar'});
},

render: function() {
return (
<div>
Expand All @@ -40,7 +44,7 @@ var App = React.createClass({
<button onClick={this.closeModal}>close</button>
<div>I am a modal</div>
<form>
<input />
<input onChange={this.handleInputChange} />
<input />
<input />
<input />
Expand Down
6 changes: 5 additions & 1 deletion lib/components/Modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,11 @@ var Modal = module.exports = React.createClass({
ariaAppHider.toggle(props.isOpen, props.appElement);
}
sanitizeProps(props);
this.portal = React.renderComponent(ModalPortal(props), this.node);
console.log('hi');
if (this.portal)
this.portal.setProps(props);
else
this.portal = React.renderComponent(ModalPortal(props), this.node);
},

render: function () {
Expand Down

0 comments on commit 07541b3

Please sign in to comment.