Fix bug where toggle charts would reset ordering
parent
5bd83b8127
commit
ef4bf8282a
|
@ -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);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue