fix(select2): Stop adding inputSelect placeholder for multiple=true input selects

This commit is contained in:
Erik Ziegler 2018-05-25 14:45:04 +02:00
parent 2ad86af12e
commit 822dc448c9

View File

@ -53,7 +53,9 @@ OHIF.mixins.select2 = new OHIF.Mixin({
}
// Check if there is already an empty option on items list
if (!_.findWhere(items, { value: '' })) {
// Note: If this is a multi-select input. Do not add a placeholder
const isMultiple = instance.data.options && instance.data.options.multiple;
if (!_.findWhere(items, { value: '' }) && isMultiple === false) {
// Clone the current items
const newItems = _.clone(items) || [];
newItems.unshift({