diff --git a/public/app/features/dashboard/components/PanelEditor/PanelEditor.tsx b/public/app/features/dashboard/components/PanelEditor/PanelEditor.tsx index d06cbfc7353..8dea8470fbe 100644 --- a/public/app/features/dashboard/components/PanelEditor/PanelEditor.tsx +++ b/public/app/features/dashboard/components/PanelEditor/PanelEditor.tsx @@ -193,11 +193,6 @@ export class PanelEditorUnconnected extends PureComponent { this.props.toggleTableView(); }; - onTogglePanelOptions = () => { - const { uiState, updatePanelEditorUIState } = this.props; - updatePanelEditorUIState({ isPanelOptionsVisible: !uiState.isPanelOptionsVisible }); - }; - renderPanel(styles: EditorStyles, isOnlyPanel: boolean) { const { dashboard, panel, uiState, tableViewEnabled, theme } = this.props; diff --git a/public/app/features/dashboard/components/PanelEditor/VisualizationButton.tsx b/public/app/features/dashboard/components/PanelEditor/VisualizationButton.tsx index 7fea2df9955..7143623a879 100644 --- a/public/app/features/dashboard/components/PanelEditor/VisualizationButton.tsx +++ b/public/app/features/dashboard/components/PanelEditor/VisualizationButton.tsx @@ -8,7 +8,8 @@ import { useDispatch, useSelector } from 'app/types'; import { PanelModel } from '../../state'; import { getPanelPluginWithFallback } from '../../state/selectors'; -import { setPanelEditorUIState, toggleVizPicker } from './state/reducers'; +import { updatePanelEditorUIState } from './state/actions'; +import { toggleVizPicker } from './state/reducers'; type Props = { panel: PanelModel; @@ -25,7 +26,7 @@ export const VisualizationButton = ({ panel }: Props) => { }; const onToggleOptionsPane = () => { - dispatch(setPanelEditorUIState({ isPanelOptionsVisible: !isPanelOptionsVisible })); + dispatch(updatePanelEditorUIState({ isPanelOptionsVisible: !isPanelOptionsVisible })); }; if (!plugin) {