Skip to content

Commit

Permalink
fix(InfoWindow): long content jank issue
Browse files Browse the repository at this point in the history
* Original commit: 81adb63
* Original author: @ztanner
* Closes #449, #444, #408
  • Loading branch information
ztanner authored and tomchentw committed Apr 20, 2017
1 parent 7849f28 commit 54ffccc
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/lib/InfoWindow.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,9 +124,10 @@ export default _.flowRight(
this.props
),
// Override props of ReactElement type
content: document.createElement(`div`),
content: undefined,
children: undefined,
});

openInfoWindow(this.context, infoWindow);
return {
[INFO_WINDOW]: infoWindow,
Expand All @@ -135,7 +136,12 @@ export default _.flowRight(

componentDidMount() {
const infoWindow = getInstanceFromComponent(this);
controlledPropUpdaterMap.children(infoWindow, this.props.children, this);
const content = document.createElement(`div`)

controlledPropUpdaterMap.children({
getContent() { return content },
}, this.props.children, this);
infoWindow.setContent(content)
},

componentWillReceiveProps(nextProps, nextContext) {
Expand Down

0 comments on commit 54ffccc

Please sign in to comment.