Skip to content

Commit

Permalink
Update use of content size change event. (#9307)
Browse files Browse the repository at this point in the history
  • Loading branch information
SergioEstevao authored Aug 24, 2018
1 parent 26a87d9 commit efbd9be
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/editor/src/components/rich-text/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit efbd9be

Please sign in to comment.