Canvas: Update scene and panel when entering panel view mode (#62043)

pull/61895/head
Adela Almasan 3 years ago committed by GitHub
parent dd597c3a1e
commit 6bf1d06dba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      public/app/plugins/panel/canvas/CanvasPanel.tsx

@ -185,11 +185,10 @@ export class CanvasPanel extends Component<Props, State> {
}
// After editing, the options are valid, but the scene was in a different panel or inline editing mode has changed
const shouldUpdateSceneAndPanel = this.needsReload && this.props.options !== nextProps.options;
const inlineEditingSwitched = this.props.options.inlineEditing !== nextProps.options.inlineEditing;
const shouldShowAdvancedTypesSwitched =
this.props.options.showAdvancedTypes !== nextProps.options.showAdvancedTypes;
if (shouldUpdateSceneAndPanel || inlineEditingSwitched || shouldShowAdvancedTypesSwitched) {
if (this.needsReload || inlineEditingSwitched || shouldShowAdvancedTypesSwitched) {
if (inlineEditingSwitched) {
// Replace scene div to prevent selecto instance leaks
this.scene.revId++;

Loading…
Cancel
Save