PanelEdit: Update UI if panel plugin changes field config (#29898)

This commit is contained in:
Torkel Ödegaard
2020-12-17 13:30:55 +01:00
committed by GitHub
parent ae575158ed
commit 72736bd2a1
2 changed files with 4 additions and 4 deletions

View File

@@ -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) => {