dead-brownD
Refine16mo ago
9 replies
dead-brown

useForm with specific type

I want to call useForm but specify a type, say Metafield. So the initial call looks like:

const { saveButtonProps, formProps, formLoading, queryResult, onFinish } = useForm<Metafield>();

Then, when I define my form component, that looks like:

<Form<Metafield> {...formProps} onFinish={handleFormatting} layout='vertical'>

However, I'm getting an error that 'formProps' is incompatible now that the <Form> has been provided a specific type. How can I resolve that error and still maintain the specific type information?
Was this page helpful?