improvement(widget-list): use singular label if available (#1793)

This commit is contained in:
Matt Suhay 2018-10-26 14:00:43 -05:00 committed by Shawn Erquhart
parent 9b72419096
commit 68895079fb

View File

@ -277,7 +277,7 @@ export default class ListControl extends React.Component {
allowAdd={field.get('allow_add', true)} allowAdd={field.get('allow_add', true)}
onAdd={this.handleAdd} onAdd={this.handleAdd}
heading={`${items.size} ${listLabel}`} heading={`${items.size} ${listLabel}`}
label={listLabel} label={labelSingular.toLowerCase()}
onCollapseToggle={this.handleCollapseAllToggle} onCollapseToggle={this.handleCollapseAllToggle}
collapsed={itemsCollapsed.every(val => val === true)} collapsed={itemsCollapsed.every(val => val === true)}
/> />