-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Custom Input component with vee-validate can't use in useFieldArray ? #4239
Comments
Could be intended, can you create an example for it on codesandbox or stackblitz? |
here is the reproduction link: when array have 2 items and i try remove the first item, the second item will remove too |
Thanks for reporting this and for the reproduction. There was indeed a bug, but keep in mind you also need to do this: // props.name is not reactive, so you either make it callback like this or use `toRef`
const { errorMessage, handleChange, value } = useField(() => props.name); The bug was deleting some keys of the object like you mentioned but not the entire thing. a patch release will be tagged shortly. As a workaround you can also remove |
cool fast update, i have try it and never see that bug again. جَزَاكَ اللهُ خَيْرًا كَثِيْرًا |
What happened?
I have custom input and i use in
useFieldArray
fields
array. when i try to remove item the field is removed it, other item reset and property is removedThis my array before i removed item with key 1
This is after removed item with key 1, some property is gone
Reproduction steps
...
Version
Vue.js 3.x and vee-validate 4.x
What browsers are you seeing the problem on?
Relevant log output
No response
Demo link
--
Code of Conduct
The text was updated successfully, but these errors were encountered: