diff --git a/src/trait_manager/view/TraitView.js b/src/trait_manager/view/TraitView.js index ad0c975e1..4e1bafc40 100644 --- a/src/trait_manager/view/TraitView.js +++ b/src/trait_manager/view/TraitView.js @@ -1,5 +1,5 @@ import Backbone from 'backbone'; -import { isUndefined, isString } from 'underscore'; +import { isUndefined, isString, isFunction } from 'underscore'; const $ = Backbone.$; @@ -193,19 +193,30 @@ export default Backbone.View.extend({ } }, + hasLabel() { + return !this.model.get('noLabel'); + }, + render() { const { $el, pfx, ppfx, model } = this; - const { noLabel, type } = model.attributes; + const { type } = model.attributes; + const hasLabel = this.hasLabel && this.hasLabel(); const cls = `${pfx}trait`; this.$input = null; let tmpl = `