You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 23, 2022. It is now read-only.
After entering some text in input box and pressing enter, input is losing focus, and to add new chips to the input either we have to click on the input or click tab and navigate through all the entered chips.
If it's not clear, will add a sandbox soon.
The text was updated successfully, but these errors were encountered:
No need to manually add the chip on blur. You can do the same thing with blurBehavior="add". That said, I don't know why Formik has problems, delayBeforeAdd might help.
Turns out this is caused by the fact that with this configuration the field is treated as an uncontrolled field because of value={values.skills} being undefined, therefore calling the onChange method instead of the onAdd and onRemove.
Easily fixable by setting the initial value as an empty array in Formik :)
P.S. it's not needed to provide the name prop to all of the items, just put it in the FieldArray prop
@chaitanya1019 you should use render method of Formik Field. Using component you just creating another component each time which means your ChipInput component mounted each time the input props are changed.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I've tried to use ChipInput Component with formik's Component in the following way,
After entering some text in input box and pressing enter, input is losing focus, and to add new chips to the input either we have to click on the input or click tab and navigate through all the entered chips.
If it's not clear, will add a sandbox soon.
The text was updated successfully, but these errors were encountered: