Scenes: Fixes layout when the editor is active (#52291)

pull/52313/head
Torkel Ödegaard 3 years ago committed by GitHub
parent 8b7516bc55
commit 85309f4e63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 6
      public/app/features/scenes/components/Scene.tsx
  2. 1
      public/app/features/scenes/components/SceneToolbarButton.tsx

@ -55,8 +55,10 @@ function SceneRenderer({ model }: SceneComponentProps<Scene>) {
return (
<Page navId="scenes" layout={PageLayoutType.Dashboard} toolbar={pageToolbar}>
<layout.Component model={layout} isEditing={isEditing} />
{$editor && <$editor.Component model={$editor} isEditing={isEditing} />}
<div style={{ flexGrow: 1, display: 'flex', gap: '8px', overflow: 'auto' }}>
<layout.Component model={layout} isEditing={isEditing} />
{$editor && <$editor.Component model={$editor} isEditing={isEditing} />}
</div>
</Page>
);
}

@ -30,6 +30,7 @@ export class SceneToolbarInput extends SceneObjectBase<SceneToolbarInputState> {
return (
<Input
defaultValue={state.value}
width={8}
onBlur={(evt) => {
model.state.onChange(parseInt(evt.currentTarget.value, 10));
}}

Loading…
Cancel
Save