Values Gets Removed Upon Validation [RHF - Zod - Multi-Select] #5823
Unanswered
BRB-OnyxTec
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
-
I've been facing an issue. The Form validation and everything seems to work just fine, except at one critical point.
When I am trying to "Add" (submit the form) it removes data from the multi-select.
### Background:
What is happening?
The "Name" field stays there in the input box, but the "Multi-Select" option gets removed. But when we add again, it stays there.
What should be happening?
Just like the 'Name' input file was present, the Multi-Select Option shouldn't be removed upon validation
I have a Modal Form, which calls the Multi-Select component and other input components.
I am using the following:
Code for Zod Scheme and helper function:
Code for Multi-Select Component:
Code for Form Page:
Beta Was this translation helpful? Give feedback.
All reactions