When using the controlled options
form_props(controlled: true, model: Post.new) do |f|
f.text :title
end
The output does not contain a value
"inputs": {
"title": {
"type": "text",
"name": "post[title]",
"id": "post_title"
},
This poses a problem in react land because if there suddenly is a value, react will say something to the effect of "uncontrolled component suddenly becomes controlled". So if controlled is used anywhere, we should give it a default value of nil or maybe empty "". I'm not sure which one makes the most sense, and would love some opinions.
When using the controlled options
The output does not contain a value
This poses a problem in react land because if there suddenly is a value, react will say something to the effect of "uncontrolled component suddenly becomes controlled". So if controlled is used anywhere, we should give it a default value of
nilor maybe empty "". I'm not sure which one makes the most sense, and would love some opinions.