mirror of
https://github.com/kingomarnajjar/flex-template-web.git
synced 2026-07-25 22:37:18 +10:00
Run prettier format for modified files
This commit is contained in:
parent
3ee4612504
commit
dc6b6f813f
2 changed files with 8 additions and 7 deletions
|
|
@ -16,8 +16,13 @@ way to update this template, but currently, we follow a pattern:
|
|||
|
||||
## [v3.5.1] 2019-09-16
|
||||
|
||||
- [add] add orverriding function `onAdd` and `onRemove` for `CustomOverlayView` in `SearchMapWithGoogleMap` to abide to React rules and do not `unmountComponentAtNode` when a component is rendered by React and use `appendChild` on `onAdd` instead of `draw` to [improve performance](https://github.com/tomchentw/react-google-maps/issues/817).
|
||||
- [fix] fix `CustomOverlayView` in `SearchMapWithGoogleMap` to work with new `react-intl` version, overriding `render` method to render child object by using `createPortal` instead of `unstable_renderSubtreeIntoContainer`.
|
||||
- [add] add orverriding function `onAdd` and `onRemove` for `CustomOverlayView` in
|
||||
`SearchMapWithGoogleMap` to abide to React rules and do not `unmountComponentAtNode` when a
|
||||
component is rendered by React and use `appendChild` on `onAdd` instead of `draw` to
|
||||
[improve performance](https://github.com/tomchentw/react-google-maps/issues/817).
|
||||
- [fix] fix `CustomOverlayView` in `SearchMapWithGoogleMap` to work with new `react-intl` version,
|
||||
overriding `render` method to render child object by using `createPortal` instead of
|
||||
`unstable_renderSubtreeIntoContainer`.
|
||||
|
||||
## [v3.5.0] 2019-08-29
|
||||
|
||||
|
|
|
|||
|
|
@ -88,7 +88,6 @@ export const isMapsLibLoaded = () =>
|
|||
* https://github.com/tomchentw/react-google-maps/issues/482
|
||||
*/
|
||||
class CustomOverlayView extends OverlayView {
|
||||
|
||||
onRemove() {
|
||||
this.containerElement.parentNode.removeChild(this.containerElement);
|
||||
//Remove `unmountComponentAtNode` for react version 16
|
||||
|
|
@ -118,10 +117,7 @@ class CustomOverlayView extends OverlayView {
|
|||
|
||||
render() {
|
||||
if (React.version.match(/^16/) && this.containerElement) {
|
||||
return ReactDOM.createPortal(
|
||||
React.Children.only(this.props.children),
|
||||
this.containerElement
|
||||
);
|
||||
return ReactDOM.createPortal(React.Children.only(this.props.children), this.containerElement);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue