You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For now the initial values are given in the model prop. But the schema can contain initial values too. So we have a helper function like getInitialValue (not included in the lib as it's pretty specific to the entities from Symfony that we have to deal with in our projects) that takes the form and an object and tries to get the initial value or each field for that.
It means that the user have to merge initial values from the schema and from an entity. I think it would be better for the user to only give the data related to the entity, and let the Form component get initial value from the schema if it should be used (e.g. if the given model doesn't have a value for a given field, but the schema has one).
The text was updated successfully, but these errors were encountered:
For now the initial values are given in the
model
prop. But the schema can contain initial values too. So we have a helper function likegetInitialValue
(not included in the lib as it's pretty specific to the entities from Symfony that we have to deal with in our projects) that takes the form and an object and tries to get the initial value or each field for that.It means that the user have to merge initial values from the schema and from an entity. I think it would be better for the user to only give the data related to the entity, and let the
Form
component get initial value from the schema if it should be used (e.g. if the givenmodel
doesn't have a value for a given field, but the schema has one).The text was updated successfully, but these errors were encountered: