Fix bug where toggle charts would reset ordering

pull/1338/head
Chris Walsh 2022-07-23 23:04:07 -07:00
parent 5bd83b8127
commit ef4bf8282a
No known key found for this signature in database
GPG Key ID: 28EE0CCA6032019E
1 changed files with 2 additions and 2 deletions

View File

@ -2,7 +2,7 @@ import React from 'react';
import { FormattedMessage } from 'react-intl'; import { FormattedMessage } from 'react-intl';
import MenuButton from 'components/common/MenuButton'; import MenuButton from 'components/common/MenuButton';
import Gear from 'assets/gear.svg'; import Gear from 'assets/gear.svg';
import useStore, { setDashboard, defaultDashboardConfig } from 'store/app'; import useStore, { setDashboard } from 'store/app';
const selector = state => state.dashboard; const selector = state => state.dashboard;
@ -18,7 +18,7 @@ export default function DashboardSettingsButton() {
function handleSelect(value) { function handleSelect(value) {
if (value === 'charts') { if (value === 'charts') {
setDashboard({ ...defaultDashboardConfig, showCharts: !settings.showCharts }); setDashboard({ ...settings, showCharts: !settings.showCharts });
} }
//setDashboard(value); //setDashboard(value);
} }