From efbd9bedf22e6392c7d0b3f78a937f9ab412d499 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Est=C3=AAv=C3=A3o?= Date: Fri, 24 Aug 2018 12:06:21 +0100 Subject: [PATCH] Update use of content size change event. (#9307) --- packages/editor/src/components/rich-text/index.native.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/editor/src/components/rich-text/index.native.js b/packages/editor/src/components/rich-text/index.native.js index 463e4af84e17a3..622a16bfa17332 100644 --- a/packages/editor/src/components/rich-text/index.native.js +++ b/packages/editor/src/components/rich-text/index.native.js @@ -82,8 +82,8 @@ export class RichText extends Component { * Handles any case where the content of the AztecRN instance has changed in size */ - onContentSizeChange( event ) { - const contentHeight = event.nativeEvent.contentSize.height; + onContentSizeChange( contentSize ) { + const contentHeight = contentSize.height; this.forceUpdate(); // force re-render the component skipping shouldComponentUpdate() See: https://reactjs.org/docs/react-component.html#forceupdate this.props.onContentSizeChange( { aztecHeight: contentHeight,