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:
5
.changeset/metal-suits-reply.md
Normal file
5
.changeset/metal-suits-reply.md
Normal 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.
|
@@ -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"
|
||||
|
Reference in New Issue
Block a user