1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-22 23:12:52 +02:00

Fix warnings related to autoCorrect and autoCapitalize (#4295)

Related to https://github.com/ianstormtaylor/slate/issues/4248
This commit is contained in:
Nicolas DUBIEN
2021-05-27 04:27:41 +02:00
committed by GitHub
parent 8db4573236
commit dfc039601f
2 changed files with 7 additions and 2 deletions

View File

@@ -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.

View File

@@ -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"