mirror of
https://github.com/grafana/grafana.git
synced 2026-07-30 00:08:10 -05:00
Canvas: Update scene and panel when entering panel view mode (#62043)
This commit is contained in:
@@ -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++;
|
||||
|
||||
Reference in New Issue
Block a user