File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed
Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ import {
1010} from "react" ;
1111
1212import {
13- render ,
13+ unstable_renderSubtreeIntoContainer ,
1414 unmountComponentAtNode ,
1515} from "react-dom" ;
1616
@@ -71,8 +71,8 @@ const publicMethodMap = {
7171} ;
7272
7373const controlledPropUpdaterMap = {
74- children ( infoWindow , children ) {
75- render ( Children . only ( children ) , infoWindow . getContent ( ) ) ;
74+ children ( infoWindow , children , component ) {
75+ unstable_renderSubtreeIntoContainer ( component , Children . only ( children ) , infoWindow . getContent ( ) ) ;
7676 } ,
7777 options ( infoWindow , options ) { infoWindow . setOptions ( options ) ; } ,
7878 position ( infoWindow , position ) { infoWindow . setPosition ( position ) ; } ,
@@ -135,7 +135,7 @@ export default _.flowRight(
135135
136136 componentDidMount ( ) {
137137 const infoWindow = getInstanceFromComponent ( this ) ;
138- controlledPropUpdaterMap . children ( infoWindow , this . props . children ) ;
138+ controlledPropUpdaterMap . children ( infoWindow , this . props . children , this ) ;
139139 } ,
140140
141141 componentWillReceiveProps ( nextProps , nextContext ) {
Original file line number Diff line number Diff line change @@ -87,7 +87,7 @@ const enhanceWithPropTypes = _.curry((
8787 _ . forEach ( controlledPropUpdaterMap , ( fn , key ) => {
8888 const nextValue = this . props [ key ] ;
8989 if ( nextValue !== prevProps [ key ] ) {
90- fn ( getInstanceFromComponent ( this ) , nextValue ) ;
90+ fn ( getInstanceFromComponent ( this ) , nextValue , this ) ;
9191 }
9292 } ) ;
9393 componentDidUpdate . call ( this , prevProps , prevState ) ;
You can’t perform that action at this time.
0 commit comments