Load, display and edit entries from test repo and github

This commit is contained in:
Mathias Biilmann Christensen
2016-06-05 01:52:18 -07:00
parent 7601d3f5a1
commit 32e54cdbdc
16 changed files with 433 additions and 46 deletions

View File

@ -8,8 +8,8 @@ export default class ControlPane extends React.Component {
return React.createElement(widget.Control, {
key: field.get('name'),
field: field,
value: entry.get(field.get('name')),
onChange: (value) => this.props.onChange(entry.set(field.get('name'), value))
value: entry.getIn(['data', field.get('name')]),
onChange: (value) => this.props.onChange(entry.setIn(['data', field.get('name')], value))
});
}
@ -18,7 +18,7 @@ export default class ControlPane extends React.Component {
if (!collection) { return null; }
return <div>
{collection.get('fields').map((field) => <div>{this.controlFor(field)}</div>)}
{collection.get('fields').map((field) => <div key={field.get('names ')}>{this.controlFor(field)}</div>)}
</div>;
}
}