From 1e6eb70af09d72ac00e19c4732c2e4aa475ffb37 Mon Sep 17 00:00:00 2001 From: Ryan McKinley Date: Sun, 9 May 2021 22:19:52 -0700 Subject: [PATCH] PanelEditor: leave table view when changing the other display modes (#33826) --- .../features/dashboard/components/PanelEditor/PanelEditor.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/app/features/dashboard/components/PanelEditor/PanelEditor.tsx b/public/app/features/dashboard/components/PanelEditor/PanelEditor.tsx index 77e03416fb7..1787ff5db20 100644 --- a/public/app/features/dashboard/components/PanelEditor/PanelEditor.tsx +++ b/public/app/features/dashboard/components/PanelEditor/PanelEditor.tsx @@ -218,6 +218,9 @@ export class PanelEditorUnconnected extends PureComponent { onDisplayModeChange = (mode?: DisplayMode) => { const { updatePanelEditorUIState } = this.props; + if (this.props.tableViewEnabled) { + this.props.toggleTableView(); + } updatePanelEditorUIState({ mode: mode, });