diff --git a/public/app/features/dashboard/components/PanelEditor/PanelEditor.tsx b/public/app/features/dashboard/components/PanelEditor/PanelEditor.tsx index 6b4088aae2f..363d139343a 100644 --- a/public/app/features/dashboard/components/PanelEditor/PanelEditor.tsx +++ b/public/app/features/dashboard/components/PanelEditor/PanelEditor.tsx @@ -127,12 +127,11 @@ export class PanelEditorUnconnected extends PureComponent { }; onFieldConfigChange = (config: FieldConfigSource) => { - const { panel } = this.props; - - panel.updateFieldConfig({ + // we do not need to trigger force update here as the function call below + // fires PanelOptionsChangedEvent which we subscribe to above + this.props.panel.updateFieldConfig({ ...config, }); - this.forceUpdate(); }; onPanelOptionsChanged = (options: any) => { diff --git a/public/app/features/dashboard/state/PanelModel.ts b/public/app/features/dashboard/state/PanelModel.ts index 6bbe807f9cf..ca5872e4a4a 100644 --- a/public/app/features/dashboard/state/PanelModel.ts +++ b/public/app/features/dashboard/state/PanelModel.ts @@ -223,6 +223,7 @@ export class PanelModel implements DataConfigSource { updateFieldConfig(config: FieldConfigSource) { this.fieldConfig = config; + this.events.publish(new PanelOptionsChangedEvent()); this.resendLastResult(); this.render();