Skip to content

Form Input looses focus upon values validity change  #200

@ThinhNguyenHoang

Description

@ThinhNguyenHoang

Hello,
For some reason the form input loses focus when the field validity change (from Invalid to invalid and vice versa) . I don't know if this is the default behavior but it feels annoying as a user (require additional mouse click to re-enter the form) .

Code:
`import { Button, Space } from 'antd';
import React from 'react';
import * as Yup from 'yup'
import { Formik } from 'formik';
import { Form, FormItem, Input} from 'formik-antd';

const validationSchema = Yup.object({
test: Yup.string().required("required")
})
const TestPage = () => (
<>
<Formik onSubmit={(val) => console.log("values", val)} initialValues={{ test: "" }} validationSchema={validationSchema}>
{({ values }) => {
return






}}

</>

);
export default TestPage;`

Expected Result: The user can continue to input even when the field validity change

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions