File tree 2 files changed +10
-2
lines changed
2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -27,6 +27,10 @@ var App = React.createClass({
27
27
this . setState ( { modalIsOpen : false } ) ;
28
28
} ,
29
29
30
+ handleInputChange : function ( ) {
31
+ this . setState ( { foo : 'bar' } ) ;
32
+ } ,
33
+
30
34
render : function ( ) {
31
35
return (
32
36
< div >
@@ -40,7 +44,7 @@ var App = React.createClass({
40
44
< button onClick = { this . closeModal } > close</ button >
41
45
< div > I am a modal</ div >
42
46
< form >
43
- < input />
47
+ < input onChange = { this . handleInputChange } />
44
48
< input />
45
49
< input />
46
50
< input />
Original file line number Diff line number Diff line change @@ -50,7 +50,11 @@ var Modal = module.exports = React.createClass({
50
50
ariaAppHider . toggle ( props . isOpen , props . appElement ) ;
51
51
}
52
52
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 ) ;
54
58
} ,
55
59
56
60
render : function ( ) {
You can’t perform that action at this time.
0 commit comments