Browse Source

Fixed Slate error by providing initial value

pull/2032/head
t1enne 4 years ago
parent
commit
1b9c04210b
  1. 6
      web/components/chat/ChatTextField/ChatTextField.tsx

6
web/components/chat/ChatTextField/ChatTextField.tsx

@ -144,7 +144,11 @@ export default function ChatTextField(props: Props) { @@ -144,7 +144,11 @@ export default function ChatTextField(props: Props) {
return (
<div className={s.root}>
<Slate editor={editor} value={[]} onChange={handleChange}>
<Slate
editor={editor}
value={[{ type: 'paragraph', children: [{ text: '' }] }]}
onChange={handleChange}
>
<Editable
onKeyDown={onKeyDown}
renderElement={p => <Element {...p} />}

Loading…
Cancel
Save