mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Exposing digest from angular component
This commit is contained in:
@@ -4,6 +4,7 @@ import _ from 'lodash';
|
||||
|
||||
export interface AngularComponent {
|
||||
destroy();
|
||||
digest();
|
||||
}
|
||||
|
||||
export class AngularLoader {
|
||||
@@ -24,6 +25,9 @@ export class AngularLoader {
|
||||
scope.$destroy();
|
||||
compiledElem.remove();
|
||||
},
|
||||
digest: () => {
|
||||
scope.$digest();
|
||||
},
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,6 +40,8 @@ export class PluginSettings extends PureComponent<Props> {
|
||||
componentDidUpdate(prevProps) {
|
||||
if (this.props.dataSource !== prevProps.dataSource) {
|
||||
this.scopeProps.ctrl.current = _.cloneDeep(this.props.dataSource);
|
||||
|
||||
this.component.digest();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user