File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -27,6 +27,10 @@ var App = React.createClass({
2727 this . setState ( { modalIsOpen : false } ) ;
2828 } ,
2929
30+ handleInputChange : function ( ) {
31+ this . setState ( { foo : 'bar' } ) ;
32+ } ,
33+
3034 render : function ( ) {
3135 return (
3236 < div >
@@ -40,7 +44,7 @@ var App = React.createClass({
4044 < button onClick = { this . closeModal } > close</ button >
4145 < div > I am a modal</ div >
4246 < form >
43- < input />
47+ < input onChange = { this . handleInputChange } />
4448 < input />
4549 < input />
4650 < input />
Original file line number Diff line number Diff line change @@ -50,7 +50,11 @@ var Modal = module.exports = React.createClass({
5050 ariaAppHider . toggle ( props . isOpen , props . appElement ) ;
5151 }
5252 sanitizeProps ( props ) ;
53- this . portal = React . renderComponent ( ModalPortal ( props ) , this . node ) ;
53+ console . log ( 'hi' ) ;
54+ if ( this . portal )
55+ this . portal . setProps ( props ) ;
56+ else
57+ this . portal = React . renderComponent ( ModalPortal ( props ) , this . node ) ;
5458 } ,
5559
5660 render : function ( ) {
You can’t perform that action at this time.
0 commit comments