Can I set the default value of an element? #3854
Unanswered
erdemkeren
asked this question in
Q&A [2.x]
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Given the following example: https://codesandbox.io/s/prod-morning-7qsycj?file=/App.tsx
a- If you submit the form with no input data and no initial values
b- If you fill the form and clear the values
c- If you provide null or empty strings for the initial values
the logged information changes.
Can we ask formily to for example,"always give an empty string
''
ornull
for the schema fields as the default value? So that we can remove the different behaviour?Axios removes the undefined values from the data which is unexpected for a nullable field by the backend. I don't want to maintain a code that should be updated for every field change either.
Any help is appreciated.
Beta Was this translation helpful? Give feedback.
All reactions