From 13fd6d3a62e7989acaccfb999ff310c726d593ed Mon Sep 17 00:00:00 2001 From: Benjamin Kniffler Date: Wed, 20 Sep 2017 17:29:03 +0200 Subject: [PATCH] Fix warning with latest react due to autocorrect being bool (#1148) `Received 'true' for non-boolean attribute 'autoCorrect'. If this is expected, cast the value to a string.` Latest react won't autocast the bool to on/off --- packages/slate-react/src/components/content.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/slate-react/src/components/content.js b/packages/slate-react/src/components/content.js index a15680ec9..e3c3ae168 100644 --- a/packages/slate-react/src/components/content.js +++ b/packages/slate-react/src/components/content.js @@ -859,7 +859,7 @@ class Content extends React.Component { onKeyUp={this.onKeyUp} onPaste={this.onPaste} onSelect={this.onSelect} - autoCorrect={props.autoCorrect} + autoCorrect={props.autoCorrect ? 'on' : 'off'} spellCheck={spellCheck} style={style} role={readOnly ? null : (role || 'textbox')}