defaultValue vs. initialValue #417
Answered
by
edmundhung
marcomuser
asked this question in
Q&A
-
I have a specific usecase where I want to set an initialValue to a field but only if the user didn't submit a value for it yet. How would you accomplish this behavior with conform v1.0? I had hoped it would be possible to set a value to a field that only applies if the defaultValues coming from the BE did not include a value for this field yet. |
Beta Was this translation helpful? Give feedback.
Answered by
edmundhung
Feb 4, 2024
Replies: 1 comment 1 reply
-
Can you elaborate more what you are trying to achieve here? Maybe you are looking for |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
marcomuser
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can you elaborate more what you are trying to achieve here? Maybe you are looking for
.default
from zod?