improvement(config): use field name as default label (#1553)
This commit is contained in:
parent
c2e21ff9db
commit
ede1bad97c
@ -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(
|
||||
|
@ -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>
|
||||
);
|
||||
}
|
||||
|
@ -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 (
|
||||
|
Loading…
x
Reference in New Issue
Block a user