Config default values (#164)

* Use public_folder to display images persisted with no path reference

* Allow for default values on a collection field
This commit is contained in:
Cássio Souza 2016-11-17 12:03:54 -02:00 committed by GitHub
parent 007575d315
commit 1fe386b324

View File

@ -13,7 +13,8 @@ export default class ControlPane extends Component {
const { entry, getMedia, onChange, onAddMedia, onRemoveMedia } = this.props;
const widget = resolveWidget(field.get('widget'));
const fieldName = field.get('name');
const value = entry.getIn(['data', fieldName]);
const fieldDefaultValue = field.get('default');
const value = entry.getIn(['data', fieldName], fieldDefaultValue);
if (entry.size === 0 || entry.get('partial') === true) return null;
return (
<div className={styles.control}>