-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Form Input looses focus upon values validity change #200
Comments
Sup! Check your chrome console for a warning that starts like this: |
Hello! Have similar issue here, but do not see any warning message like mentioned above by @elghst. How to reproduce:
How to fix:
|
@andrii-muntian-p24 This is an issue with antd but in your case adding hasFeedback={false} to the FormItem or adding showCount to the TextArea should fix the issue. |
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
The text was updated successfully, but these errors were encountered: