Parent and Subfields #1161
-
Hi, Quick question about the behavior of a Parent and its subfields. In my model, I notice that when I try to type in my field, the modelTransform always returns
I assume this is normal behavior correct? I just did a test, if I omit the For what reason would a field being defined as Sorry if I am unclear. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
Hi there! I guess we're talking about setIn = (model, key, value) => _.setWith(_.clone(model), key, value, _.clone)
setIn({ address: null }, 'address.streetName', 'Elm') // { address: null } No, it doesn't. I don't think it should either, as |
Beta Was this translation helpful? Give feedback.
Hi there! I guess we're talking about
AutoForm
here? If so, the logic we use for changing the model is here. Here's a quick test to see whether it handles this case or not:No, it doesn't. I don't think it should either, as
null
is technically not a validaddress
, at least by my standards. Do you think it should handle this case? If so, where is thisnull
coming from?