skinny-azureS
Refine3y ago
3 replies
skinny-azure

I have this super strange error and I dont know why ... Instance created by useForm is not connected

I have this super strange error and I dont know why ... Instance created by useForm is not connected to any Form element. Forget to pass form prop?
    const { form, formProps, onFinish } = useForm<any>({
        action: "create",
        dataProviderName: PROVIDERS.LEARNING_LAB,
        resource: process.env.REACT_APP_LOGIN_PATH!+`?${query}`
    })
...

...
return (
        <div className="container">
            <ConfigProvider theme={{token: { colorPrimary: clientDetails?.color ?? "" }}}>
                <Form {...formProps} form={form} name="connect" onFinish={handleFinish}  size="large" className="form">
                  /*Here is my form with some Form.Item*/
                </Form>
            </ConfigProvider>
        </div>
  )
...

As you may see, I didn't forget tu pass the form props : Form {...formProps} form={form} so why I have this error ??? PS : I'm not using this form inside a modal, it's a simple page
Was this page helpful?