fix(select2): Stop adding inputSelect placeholder for multiple=true input selects
This commit is contained in:
parent
2ad86af12e
commit
822dc448c9
@ -53,7 +53,9 @@ OHIF.mixins.select2 = new OHIF.Mixin({
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check if there is already an empty option on items list
|
// 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
|
// Clone the current items
|
||||||
const newItems = _.clone(items) || [];
|
const newItems = _.clone(items) || [];
|
||||||
newItems.unshift({
|
newItems.unshift({
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user