Skip to content

Support for initialValues prop in Create? #68

@nsdub

Description

@nsdub

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions