fix react hook form

This commit is contained in:
João Geonizeli
2022-07-22 12:28:00 -03:00
parent feb72ce6a4
commit 20781746e6
17 changed files with 71 additions and 97 deletions

View File

@@ -1,7 +1,7 @@
import React, { FC } from "react";
import { Controller } from "react-hook-form";
import CKEditor from "@ckeditor/ckeditor5-react";
import * as ClassicEditor from "ckeditor5-mathtype/build/ckeditor";
import ClassicEditor from "ckeditor5-mathtype/build/ckeditor";
import { useFormProvider } from '../FormContext'
@@ -37,7 +37,9 @@ export const TextEditor: FC<Props> = ({ name, defaultValue }) => {
control={control}
name={name}
defaultValue={defaultValue}
render={({ onChange, value }) => (
render={({
field: { onChange, value }
}) => (
<CKEditor
editor={ClassicEditor}
data={value}