Restore the old CBI behaviour of not automatically rendering empty
selection choices in ListValue select dropdowns when .rmempty is
specified.
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
id: this.cbid(section_id),
size: this.size,
sort: this.keylist,
- optional: this.rmempty || this.optional,
+ optional: this.optional,
placeholder: this.placeholder,
validate: L.bind(this.validate, this, section_id)
});
'multiple': this.options.multiple ? '' : null
}));
- if (this.options.optional)
+ if (this.options.optional || this.choices.hasOwnProperty(''))
frameEl.lastChild.appendChild(E('option', {
'value': '',
'selected': (this.values.length == 0 || this.values[0] == '') ? '' : null
sort = self.keylist,
widget = self.widget,
datatype = self.datatype,
- optional = self.optional or self.rmempty,
+ optional = self.optional,
placeholder = self.placeholder
}
}))%>></div>