React-admin lets you pass in an initialValues object to <SimpleForm> to specify a set of default values when creating a record (ref).
Does react-admin-firebase contain support for the initialValues prop?
In my project, the object passed to initialValues is ignored. Example:
const defaultValues = {
createdAt: new Date().getTime(),
....
}
<SimpleForm initialValues={defaultValues}>
<TextInput source="first_name" />
</SimpleForm>
We'd expect the newly created record to contain the fields in defaultValues.
React-admin lets you pass in an
initialValuesobject to<SimpleForm>to specify a set of default values when creating a record (ref).Does
react-admin-firebasecontain support for theinitialValuesprop?In my project, the object passed to
initialValuesis ignored. Example:We'd expect the newly created record to contain the fields in
defaultValues.