mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-13 18:53:59 +02:00
fix shouldComponentUpdate check on content
This commit is contained in:
@@ -84,12 +84,15 @@ class Content extends React.Component {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
shouldComponentUpdate = (props, state) => {
|
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 (
|
return (
|
||||||
props.className != this.props.className ||
|
props.className != this.props.className ||
|
||||||
props.readOnly != this.props.readOnly ||
|
props.readOnly != this.props.readOnly ||
|
||||||
props.spellCheck != this.props.spellCheck ||
|
props.spellCheck != this.props.spellCheck ||
|
||||||
props.style != this.props.style ||
|
props.style != this.props.style
|
||||||
props.state.isNative !== true
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user