LT-67: Fixing change event bubbling on formItem mixin
This commit is contained in:
parent
6e84a388b6
commit
c4ac8cbeef
@ -160,9 +160,18 @@ OHIF.mixins.formItem = new OHIF.Mixin({
|
||||
|
||||
events: {
|
||||
|
||||
// Enable reactivity by changing a Tracker.Dependency observer
|
||||
// Handle the change event for the component
|
||||
change(event, instance) {
|
||||
instance.component.changeObserver.changed();
|
||||
const component = instance.component;
|
||||
|
||||
// Prevent execution on upper components
|
||||
if (event.currentTarget === component.$element[0]) {
|
||||
// Enable reactivity by changing a Tracker.Dependency observer
|
||||
component.changeObserver.changed();
|
||||
|
||||
// Revalidate the component
|
||||
component.validate();
|
||||
}
|
||||
},
|
||||
|
||||
// TODO: [design] remove log, show error box/hint over the wrapper
|
||||
|
||||
@ -30,7 +30,6 @@ const getCurrentSchema = (parentComponent, key) => {
|
||||
|
||||
// Merge the sub-schema properties if it's an array
|
||||
if (Array.isArray(currentSchema.type())) {
|
||||
console.warn('>>>>IS ARRAY', currentSchema);
|
||||
_.extend(currentSchema, schema._schema[key + '.$']);
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user