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

This commit is contained in:
Adela Almasan
2023-01-24 18:41:08 -06:00
committed by GitHub
parent dd597c3a1e
commit 6bf1d06dba
@@ -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++;