Hi issues
#3799
Replies: 3 comments 3 replies
-
Can you create an example on codesandbox or stackblitz? |
Beta Was this translation helpful? Give feedback.
3 replies
-
It's strongly work :)
Thanks guys
Le lun. 13 juin 2022 à 12:12, Tengku Arif ***@***.***> a
écrit :
… I've come across this situation once before. Here's a simple reproduction
of the solution I came up with:
https://stackblitz.com/edit/vue3-script-setup-with-vite-s7hnmn?file=src/App.vue
—
Reply to this email directly, view it on GitHub
<#3799 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHPD6V5MGW7HHRMLDCLCAOTVO4QSJANCNFSM5YRWR5RA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
-
Thank you for the clarification.
Le lun. 13 juin 2022 à 20:34, Abdelrahman Awad ***@***.***> a
écrit :
… This is because of your input component not adjusting to the name changing
when you remove an item. You need to pass a reactive reference to useField
so vee-validate can detect that.
import { defineProps, toRef } from 'vue';import { useField } from 'vee-validate';
const props = defineProps({
itemInputName: String,
quantityInputName: String,})
const { value: item, errorMessage: itemError } = useField(toRef(props, 'itemInputName'))const { value: quantity, errorMessage: quantityError } = useField(toRef(props, 'quantityInputName'))
https://stackblitz.com/edit/vue3-script-setup-with-vite-pmxfpv?file=src%2FApp.vue,src%2Fcomponents%2FInventoryFormInputs.vue
—
Reply to this email directly, view it on GitHub
<#3799 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AHPD6VZBQGK3GY2IEYROKI3VO6LMBANCNFSM5YRWR5RA>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I use useFieldArray and I remember that I can only remove the last item of the array like:
I tried to use
but fields is ReadOnly
Beta Was this translation helpful? Give feedback.
All reactions