mirror of
https://github.com/grafana/grafana.git
synced 2025-01-07 22:53:56 -06:00
PanelEdit: Update UI if panel plugin changes field config (#29898)
This commit is contained in:
parent
ae575158ed
commit
72736bd2a1
@ -127,12 +127,11 @@ export class PanelEditorUnconnected extends PureComponent<Props> {
|
||||
};
|
||||
|
||||
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) => {
|
||||
|
@ -223,6 +223,7 @@ export class PanelModel implements DataConfigSource {
|
||||
|
||||
updateFieldConfig(config: FieldConfigSource) {
|
||||
this.fieldConfig = config;
|
||||
this.events.publish(new PanelOptionsChangedEvent());
|
||||
|
||||
this.resendLastResult();
|
||||
this.render();
|
||||
|
Loading…
Reference in New Issue
Block a user