diff --git a/src/editors/enum.js b/src/editors/enum.js index ec3e53c86..1d84005e0 100644 --- a/src/editors/enum.js +++ b/src/editors/enum.js @@ -4,7 +4,7 @@ JSONEditor.defaults.editors.enum = JSONEditor.AbstractEditor.extend({ return 4; }, build: function() { - var container = this.getContainer(); + var container = this.container; this.title = this.header = this.label = this.theme.getFormInputLabel(this.getTitle()); this.container.appendChild(this.title); @@ -34,6 +34,8 @@ JSONEditor.defaults.editors.enum = JSONEditor.AbstractEditor.extend({ this.display_area.style.paddingTop = 0; this.display_area.style.paddingBottom = 0; this.container.appendChild(this.display_area); + + if(this.options.hide_display) this.display_area.style.display = "none"; this.switcher.addEventListener('change',function() { self.selected = self.select_options.indexOf(this.value);