Fix bug where toggle charts would reset ordering

This commit is contained in:
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

View File

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