improvement(config): use field name as default label (#1553)

This commit is contained in:
Michael Henderson 2018-11-02 12:22:16 -05:00 committed by Shawn Erquhart
parent c2e21ff9db
commit ede1bad97c
3 changed files with 4 additions and 4 deletions

View File

@ -199,7 +199,7 @@ class EditorControl extends React.Component {
)}
htmlFor={fieldName + uniqueFieldId}
>
{field.get('label')}
{field.get('label', field.get('name'))}
</label>
<Widget
classNameWrapper={cx(

View File

@ -89,7 +89,7 @@ export default class PreviewPane extends React.Component {
) {
value = (
<div>
<strong>{field.get('label')}:</strong> {value}
<strong>{field.get('label', field.get('name'))}:</strong> {value}
</div>
);
}

View File

@ -267,8 +267,8 @@ export default class ListControl extends React.Component {
const { value, forID, field, classNameWrapper } = this.props;
const { itemsCollapsed } = this.state;
const items = value || List();
const label = field.get('label');
const labelSingular = field.get('label_singular') || field.get('label');
const label = field.get('label', field.get('name'));
const labelSingular = field.get('label_singular') || field.get('label', field.get('name'));
const listLabel = items.size === 1 ? labelSingular.toLowerCase() : label.toLowerCase();
return (