Fix force mouse move if child count changed

This commit is contained in:
cybice 2015-10-24 04:13:32 +03:00
parent 5ee5a8c808
commit 64ca283d23

View File

@ -77,8 +77,16 @@ export default class GoogleMapMarkers extends Component {
return;
}
const prevChildCount = (this.state.children || []).length;
const state = this._getState();
this.setState(state);
this.setState(
state,
() =>
(state.children || []).length !== prevChildCount &&
this._onMouseChangeHandler()
);
}
_onChildClick = () => {