85036: Propagate ngOnChanges calls down to wrapped component

This commit is contained in:
Yura Bondarenko
2021-11-24 16:55:13 +01:00
parent 7990510099
commit e6040303df

View File

@@ -47,6 +47,9 @@ export abstract class ThemedComponent<T> implements OnInit, OnDestroy, OnChanges
// if an input or output has changed // if an input or output has changed
if (this.inAndOutputNames.some((name: any) => hasValue(changes[name]))) { if (this.inAndOutputNames.some((name: any) => hasValue(changes[name]))) {
this.connectInputsAndOutputs(); this.connectInputsAndOutputs();
if (this.compRef?.instance && 'ngOnChanges' in this.compRef?.instance) {
(this.compRef.instance as any).ngOnChanges(changes);
}
} }
} }