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

This commit is contained in:
Torkel Ödegaard 2022-11-24 16:03:26 +01:00 committed by GitHub
parent a8bae3f0b0
commit d76638338d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 7 deletions

View File

@ -193,11 +193,6 @@ export class PanelEditorUnconnected extends PureComponent<Props> {
this.props.toggleTableView(); this.props.toggleTableView();
}; };
onTogglePanelOptions = () => {
const { uiState, updatePanelEditorUIState } = this.props;
updatePanelEditorUIState({ isPanelOptionsVisible: !uiState.isPanelOptionsVisible });
};
renderPanel(styles: EditorStyles, isOnlyPanel: boolean) { renderPanel(styles: EditorStyles, isOnlyPanel: boolean) {
const { dashboard, panel, uiState, tableViewEnabled, theme } = this.props; const { dashboard, panel, uiState, tableViewEnabled, theme } = this.props;

View File

@ -8,7 +8,8 @@ import { useDispatch, useSelector } from 'app/types';
import { PanelModel } from '../../state'; import { PanelModel } from '../../state';
import { getPanelPluginWithFallback } from '../../state/selectors'; import { getPanelPluginWithFallback } from '../../state/selectors';
import { setPanelEditorUIState, toggleVizPicker } from './state/reducers'; import { updatePanelEditorUIState } from './state/actions';
import { toggleVizPicker } from './state/reducers';
type Props = { type Props = {
panel: PanelModel; panel: PanelModel;
@ -25,7 +26,7 @@ export const VisualizationButton = ({ panel }: Props) => {
}; };
const onToggleOptionsPane = () => { const onToggleOptionsPane = () => {
dispatch(setPanelEditorUIState({ isPanelOptionsVisible: !isPanelOptionsVisible })); dispatch(updatePanelEditorUIState({ isPanelOptionsVisible: !isPanelOptionsVisible }));
}; };
if (!plugin) { if (!plugin) {