Fixing select2 placeholder when the data is reactive
This commit is contained in:
parent
807c288db0
commit
41fb606b2a
@ -19,6 +19,7 @@ OHIF.mixins.select2 = new OHIF.Mixin({
|
||||
// Check if this select will include a placeholder
|
||||
const placeholder = instance.data.options && instance.data.options.placeholder;
|
||||
if (placeholder) {
|
||||
instance.autorun(() => {
|
||||
// Get the option items
|
||||
let items = instance.data.items;
|
||||
|
||||
@ -44,6 +45,7 @@ OHIF.mixins.select2 = new OHIF.Mixin({
|
||||
instance.data.items = newItems;
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user