Commit 52232f98 by Peter Holmberg

Exposing digest from angular component

parent e37fa486
...@@ -4,6 +4,7 @@ import _ from 'lodash'; ...@@ -4,6 +4,7 @@ import _ from 'lodash';
export interface AngularComponent { export interface AngularComponent {
destroy(); destroy();
digest();
} }
export class AngularLoader { export class AngularLoader {
...@@ -24,6 +25,9 @@ export class AngularLoader { ...@@ -24,6 +25,9 @@ export class AngularLoader {
scope.$destroy(); scope.$destroy();
compiledElem.remove(); compiledElem.remove();
}, },
digest: () => {
scope.$digest();
},
}; };
} }
} }
......
...@@ -40,6 +40,8 @@ export class PluginSettings extends PureComponent<Props> { ...@@ -40,6 +40,8 @@ export class PluginSettings extends PureComponent<Props> {
componentDidUpdate(prevProps) { componentDidUpdate(prevProps) {
if (this.props.dataSource !== prevProps.dataSource) { if (this.props.dataSource !== prevProps.dataSource) {
this.scopeProps.ctrl.current = _.cloneDeep(this.props.dataSource); this.scopeProps.ctrl.current = _.cloneDeep(this.props.dataSource);
this.component.digest();
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment