Skip to content

Commit 2f174dd

Browse files
committed
update refs
1 parent 5e5051c commit 2f174dd

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

dist/GoogleApiComponent.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,8 @@
200200
}, {
201201
key: 'render',
202202
value: function render() {
203+
var _this2 = this;
204+
203205
var LoadingContainer = this.LoadingContainer;
204206

205207
if (!this.state.loaded) {
@@ -215,7 +217,9 @@
215217
'div',
216218
null,
217219
_react2.default.createElement(WrappedComponent, props),
218-
_react2.default.createElement('div', { ref: 'map' })
220+
_react2.default.createElement('div', { ref: function ref(_ref) {
221+
return _this2._mapRef = _ref;
222+
} })
219223
);
220224
}
221225
}]);

src/GoogleApiComponent.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ export const wrapper = input => WrappedComponent => {
120120
return (
121121
<div>
122122
<WrappedComponent {...props} />
123-
<div ref="map" />
123+
<div ref={ref => this._mapRef = ref} />
124124
</div>
125125
);
126126
}

0 commit comments

Comments
 (0)