diff --git a/examples/basic/app.js b/examples/basic/app.js index 42c3dbe8..b4b0a5cf 100644 --- a/examples/basic/app.js +++ b/examples/basic/app.js @@ -27,6 +27,10 @@ var App = React.createClass({ this.setState({modalIsOpen: false}); }, + handleInputChange: function() { + this.setState({foo: 'bar'}); + }, + render: function() { return (
@@ -40,7 +44,7 @@ var App = React.createClass({
I am a modal
- + diff --git a/lib/components/Modal.js b/lib/components/Modal.js index c39a87f4..ac9b5920 100644 --- a/lib/components/Modal.js +++ b/lib/components/Modal.js @@ -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 () {