Open KawhiWei opened 2 years ago
I have the same problem using slate with ant.design Form Item.
Adding an hidden input n Form.Item fixed my problem though.
<Form.Item
name="ug_description"
label={i18n.t("common.mobile")}
initialValue={data?.data?.ug_description}
>
<Slate editor={editor} value={initialValue}>
<Editable />
</Slate>
<Input hidden />
</Form.Item>
https://stackblitz.com/edit/github-kgekdm
https://docs.slatejs.org/concepts/02-nodes
you need children property in editor value
Description When I use stale read again, I have a problem ([Slate] value is invalid! Expected a list of elementsbut got: undefined)
Recording If the Slate component and Editable are placed in the Form.Item tag of antdesign, this problem will occur. How can I solve it? The Slate version is 0.82.1, the slate read version is 0.83.0, and the ant design version is 4.10.2