From a7904f13cce3d309ccb217dc962456085cd3df5d Mon Sep 17 00:00:00 2001 From: Dominik Prokop Date: Fri, 17 Apr 2020 18:04:57 +0200 Subject: [PATCH] Remove temporary NewPanelEditorContext (#23652) --- .../components/PanelEditor/PanelEditor.tsx | 20 +++++-------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/public/app/features/dashboard/components/PanelEditor/PanelEditor.tsx b/public/app/features/dashboard/components/PanelEditor/PanelEditor.tsx index 026c75040e2..3ad9f248b3d 100644 --- a/public/app/features/dashboard/components/PanelEditor/PanelEditor.tsx +++ b/public/app/features/dashboard/components/PanelEditor/PanelEditor.tsx @@ -56,9 +56,6 @@ interface DispatchProps { type Props = OwnProps & ConnectedProps & DispatchProps; -// TODO[NewPanelEdit]: Remove when we switch to new panel editor -export const NewPanelEditorContext = React.createContext(false); - export class PanelEditorUnconnected extends PureComponent { querySubscription: Unsubscribable; @@ -123,11 +120,6 @@ export class PanelEditorUnconnected extends PureComponent { document.body.style.cursor = 'row-resize'; }; - onPanelTitleChange = (title: string) => { - this.props.panel.title = title; - this.forceUpdate(); - }; - onDiplayModeChange = (mode: DisplayMode) => { const { updatePanelEditorUIState } = this.props; updatePanelEditorUIState({ @@ -299,14 +291,12 @@ export class PanelEditorUnconnected extends PureComponent { } return ( - -
- {this.editorToolbar(styles)} -
- {uiState.isPanelOptionsVisible ? this.renderWithOptionsPane(styles) : this.renderHorizontalSplit(styles)} -
+
+ {this.editorToolbar(styles)} +
+ {uiState.isPanelOptionsVisible ? this.renderWithOptionsPane(styles) : this.renderHorizontalSplit(styles)}
- +
); } }