[v9.3.x] PanelEdit: Fixes bug with not remembering panel options pane collapse/expand state (#59309)

PanelEdit: Fixes bug with not remembering panel options pane collapse/expand state (#59265)

(cherry picked from commit d76638338d)

Co-authored-by: Torkel Ödegaard <torkel@grafana.com>
This commit is contained in:
Grot (@grafanabot)
2022-12-08 09:44:04 +01:00
committed by GitHub
co-authored by Torkel Ödegaard
parent f5ba14f546
commit 8172672e96
2 changed files with 3 additions and 7 deletions
@@ -193,11 +193,6 @@ export class PanelEditorUnconnected extends PureComponent<Props> {
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;
@@ -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) {