diff --git a/.changeset/metal-suits-reply.md b/.changeset/metal-suits-reply.md new file mode 100644 index 000000000..f2018a690 --- /dev/null +++ b/.changeset/metal-suits-reply.md @@ -0,0 +1,5 @@ +--- +'slate-react': patch +--- + +Fix React warnings related to `autoCorrect` and `autoCapitalize` attributes being passed as a boolean instead of a string. diff --git a/packages/slate-react/src/components/editable.tsx b/packages/slate-react/src/components/editable.tsx index 5c4ef4613..7c0582ee2 100644 --- a/packages/slate-react/src/components/editable.tsx +++ b/packages/slate-react/src/components/editable.tsx @@ -507,10 +507,10 @@ export const Editable = (props: EditableProps) => { // have to use hacks to make these replacement-based features work. spellCheck={!HAS_BEFORE_INPUT_SUPPORT ? false : attributes.spellCheck} autoCorrect={ - !HAS_BEFORE_INPUT_SUPPORT ? false : attributes.autoCorrect + !HAS_BEFORE_INPUT_SUPPORT ? 'false' : attributes.autoCorrect } autoCapitalize={ - !HAS_BEFORE_INPUT_SUPPORT ? false : attributes.autoCapitalize + !HAS_BEFORE_INPUT_SUPPORT ? 'false' : attributes.autoCapitalize } data-slate-editor data-slate-node="value"