Make functions toggle display count of applied functions
Doing that grammar thing so it doesn’t read “1 Functions”pull/10616/head
parent
7ad47a581d
commit
ce2aa65789
|
@ -82,6 +82,15 @@ const FieldListItem = React.createClass({
|
|||
)
|
||||
}
|
||||
|
||||
let fieldFuncsLabel
|
||||
if (!fieldFunc.funcs.length) {
|
||||
fieldFuncsLabel = 'Functions'
|
||||
} else if (fieldFunc.funcs.length === 1) {
|
||||
fieldFuncsLabel = `${fieldFunc.funcs.length} Function`
|
||||
} else if (fieldFunc.funcs.length > 1) {
|
||||
fieldFuncsLabel = `${fieldFunc.funcs.length} Functions`
|
||||
}
|
||||
|
||||
return (
|
||||
<div key={fieldFunc}>
|
||||
<div
|
||||
|
@ -101,7 +110,7 @@ const FieldListItem = React.createClass({
|
|||
})}
|
||||
onClick={this.toggleFunctionsMenu}
|
||||
>
|
||||
Functions
|
||||
{fieldFuncsLabel}
|
||||
</div>
|
||||
: null}
|
||||
</div>
|
||||
|
|
Loading…
Reference in New Issue