Fixed Slate error by providing initial value
This commit is contained in:
@@ -144,7 +144,11 @@ export default function ChatTextField(props: Props) {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={s.root}>
|
<div className={s.root}>
|
||||||
<Slate editor={editor} value={[]} onChange={handleChange}>
|
<Slate
|
||||||
|
editor={editor}
|
||||||
|
value={[{ type: 'paragraph', children: [{ text: '' }] }]}
|
||||||
|
onChange={handleChange}
|
||||||
|
>
|
||||||
<Editable
|
<Editable
|
||||||
onKeyDown={onKeyDown}
|
onKeyDown={onKeyDown}
|
||||||
renderElement={p => <Element {...p} />}
|
renderElement={p => <Element {...p} />}
|
||||||
|
|||||||
Reference in New Issue
Block a user