From 1b92bc62cbdbe2cabdd2c43bd1ae198f9cdeb57d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Thu, 22 Nov 2018 12:19:52 +0100 Subject: [PATCH] edit mode styling --- .../features/dashboard/dashgrid/EditorTabBody.tsx | 14 ++++++++++++-- .../app/features/dashboard/dashgrid/QueriesTab.tsx | 2 +- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/public/app/features/dashboard/dashgrid/EditorTabBody.tsx b/public/app/features/dashboard/dashgrid/EditorTabBody.tsx index 02404a917e6..6228cbe6691 100644 --- a/public/app/features/dashboard/dashgrid/EditorTabBody.tsx +++ b/public/app/features/dashboard/dashgrid/EditorTabBody.tsx @@ -20,6 +20,7 @@ export interface EditorToolBarView { interface State { openView?: EditorToolBarView; + test: boolean; } export class EditorTabBody extends PureComponent { @@ -28,9 +29,14 @@ export class EditorTabBody extends PureComponent { this.state = { openView: null, + test: false, }; } + componentDidMount() { + this.setState({ test: true }); + } + onToggleToolBarView = (item: EditorToolBarView) => { this.setState({ openView: item === this.state.openView ? null : item, @@ -96,7 +102,7 @@ export class EditorTabBody extends PureComponent { render() { const { children, toolbarItems, main, heading } = this.props; - const { openView } = this.state; + const { openView, test } = this.state; return ( <>
@@ -110,7 +116,11 @@ export class EditorTabBody extends PureComponent {
{openView && this.renderOpenView(openView)}
-
{children}
+
+ + {children} + +
diff --git a/public/app/features/dashboard/dashgrid/QueriesTab.tsx b/public/app/features/dashboard/dashgrid/QueriesTab.tsx index 5ce178c7931..cba631fb141 100644 --- a/public/app/features/dashboard/dashgrid/QueriesTab.tsx +++ b/public/app/features/dashboard/dashgrid/QueriesTab.tsx @@ -238,7 +238,7 @@ export class QueriesTab extends PureComponent { }; return ( - +
(this.element = element)} style={{ width: '100%' }} /> );