From 35376216c6d2b0228364572f3b5ef9e2f22d601a Mon Sep 17 00:00:00 2001 From: Francois Zaninotto Date: Sat, 3 Sep 2016 23:30:54 +0200 Subject: [PATCH] Reverted example to use for posts --- example/posts.js | 14 ++++++++------ src/mui/field/ReferenceManyField.js | 2 +- 2 files changed, 9 insertions(+), 7 deletions(-) diff --git a/example/posts.js b/example/posts.js index 9bc9e91c994..201a691dee5 100644 --- a/example/posts.js +++ b/example/posts.js @@ -1,5 +1,5 @@ import React from 'react'; -import { List, Filter, Edit, Create, ChipField, DateField, TextField, EditButton, Labeled, DisabledInput, TextInput, LongTextInput, DateInput, ReferenceManyField } from 'admin-on-rest/mui'; +import { List, Filter, Edit, Create, DateField, TextField, EditButton, Labeled, DisabledInput, TextInput, LongTextInput, DateInput, ReferenceManyDatagridField } from 'admin-on-rest/mui'; export PostIcon from 'material-ui/svg-icons/action/book'; @@ -28,16 +28,18 @@ const PostTitle = ({ record }) => { export const PostEdit = (props) => ( - - - - - + + + + + + + ); diff --git a/src/mui/field/ReferenceManyField.js b/src/mui/field/ReferenceManyField.js index 5110c1df3e9..8c23e9e1433 100644 --- a/src/mui/field/ReferenceManyField.js +++ b/src/mui/field/ReferenceManyField.js @@ -35,7 +35,7 @@ export class ReferenceManyField extends Component { :
{Object.keys(referenceRecords).map(index => { - const props = { ...children.props, record: referenceRecords[index], resource, basePath: referenceBasePath }; + const props = { ...children.props, key: index, record: referenceRecords[index], resource, basePath: referenceBasePath }; return ; })}
;