Reset value of a repeat field #304
Unanswered
jmanuelrosa
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi!
I am working with remix-validated-form, and I have an entry that is an array. I will process as many inputs as this according to the value of another input. It works fine, but every time I render a new input, I get the old values that the user typed.
Do you know how I can remove the old value that the user typed in so that I don't keep them and leave the new list of inputs with no value?
This is my component:
The X value is another value set in a dropdown, and when I submit the form I get
internalNumber[0]
etc with the correct value. It's ok, and what I expect.If I update, and choose another number in the dropdown, the number of inputs I render is fine, but the value is the same as before, and I can't reset the value of the input array to 0, do you know how can I do it using remix-validated-form library?
Thanks in advance
Beta Was this translation helpful? Give feedback.
All reactions