mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-12 10:14:02 +02:00
fix shouldComponentUpdate check on content
This commit is contained in:
@@ -84,12 +84,15 @@ class Content extends React.Component {
|
||||
*/
|
||||
|
||||
shouldComponentUpdate = (props, state) => {
|
||||
// If the state has been transformed natively, never re-render, or else we
|
||||
// will end up duplicating content.
|
||||
if (props.state.isNative) return false
|
||||
|
||||
return (
|
||||
props.className != this.props.className ||
|
||||
props.readOnly != this.props.readOnly ||
|
||||
props.spellCheck != this.props.spellCheck ||
|
||||
props.style != this.props.style ||
|
||||
props.state.isNative !== true
|
||||
props.style != this.props.style
|
||||
)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user