Skip to content

Commit

Permalink
Always re-render RichText component when a change happens on Native side
Browse files Browse the repository at this point in the history
  • Loading branch information
daniloercoli committed Nov 29, 2018
1 parent 3b5ab7b commit 7766b5c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/editor/src/components/rich-text/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,7 @@ export class RichText extends Component {
this.lastContent = undefined;
return true;
}
/*
// The check below allows us to avoid updating the content right after an `onChange` call.
// The first time the component is drawn `lastContent` and `lastEventCount ` are both undefined
if ( this.lastEventCount &&
Expand All @@ -276,7 +277,7 @@ export class RichText extends Component {
nextProps.value === this.lastContent ) {
return false;
}

*/
// If the component is changed React side (merging/splitting/custom text actions) we need to make sure
// the native is updated as well
if ( nextProps.value &&
Expand Down

0 comments on commit 7766b5c

Please sign in to comment.