Skip to content

Commit 6ce942f

Browse files
committed
fix of #445
1 parent bb757ec commit 6ce942f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/controls/richText/RichText.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ export class RichText extends React.Component<IRichTextProps, IRichTextState> {
186186
*/
187187
public shouldComponentUpdate(nextProps: IRichTextProps, nextState: IRichTextState): boolean {
188188
// Checks if the value coming in is the same
189-
if (isEqual(nextState, this.state)) {
189+
if (isEqual(nextState, this.state) && isEqual(nextProps, this.props)) {
190190
return false;
191191
}
192192

@@ -403,7 +403,7 @@ export class RichText extends React.Component<IRichTextProps, IRichTextState> {
403403
// If we're not in edit mode, display read-only version of the html
404404
if (!isEditMode) {
405405
return (
406-
<div className={`ql-editor ${styles.richtext} ${this.props.className}`}
406+
<div className={`ql-editor ${styles.richtext} ${this.props.className || ''}`}
407407
dangerouslySetInnerHTML={{ __html: text }}>
408408
</div>
409409
);
@@ -578,7 +578,7 @@ id="DropDownStyles"
578578
editor={this.getEditor()}
579579
isOpen={this.state.morePaneVisible}
580580
onClose={this.handleClosePanel}
581-
onLink={this.showInsertLinkDialog}
581+
onLink={this.showInsertLinkDialog}
582582
customColors={this.props.customColors}/>
583583

584584
{

0 commit comments

Comments
 (0)