Skip to content

Commit

Permalink
Fix warnings related to autoCorrect and autoCapitalize (#4295)
Browse files Browse the repository at this point in the history
Related to #4248
  • Loading branch information
dubzzz authored May 27, 2021
1 parent 8db4573 commit dfc0396
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .changeset/metal-suits-reply.md
Original file line number Diff line number Diff line change
@@ -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.
4 changes: 2 additions & 2 deletions packages/slate-react/src/components/editable.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit dfc0396

Please sign in to comment.