Using defaultValue
in Conform doesn't affect defaultValue
in input
?
#547
-
I used defaultValue: {
id: affiliate?.affiliate_id,
via: affiliate?.via,
paypal: affiliate?.paypal,
ref: affiliate?.ref,
},
// my input
<input type="hidden" name="id" value={affiliate?.affiliate_id || ""} /> If i remove I also have prop <input
type="text"
name="via"
id="via"
placeholder="customer"
defaultValue={affiliate?.via || ""}
/> Why? Shouldn't that work? At least for |
Beta Was this translation helpful? Give feedback.
Answered by
deadcoder0904
Mar 28, 2024
Replies: 1 comment
-
It works now. It wasn't working before because I wasn't passing props to it. I think passing this did the trick: {...getInputProps(fields.via, { type: "text" })} I did the same for the above <Input className="hidden" {...getInputProps(fields.id, { type: "hidden" })} /> |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
deadcoder0904
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
It works now. It wasn't working before because I wasn't passing props to it.
I think passing this did the trick:
I did the same for the above
input
as well: