Skip to content

Supported nested objects in field & input source with dotted notation #19

Description

@vaizki

I have a nested object in my record, like this:

{
  id: "abcdef",
  info: {
    tree: {
       x: 1,
       y: 2
    }
  }
}

Now if I use the JSON view components and put source="info.tree" it doesn't work as the component looks for record[source]. The React Admin native fields and inputs use lodash to resolve nested location:

import get from 'lodash/get';
...
const value = get(record, source);

Could you incorporate this into the field and input?

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