From ef4bf8282afda6879b9312d96423397caf2d1a09 Mon Sep 17 00:00:00 2001 From: Chris Walsh Date: Sat, 23 Jul 2022 23:04:07 -0700 Subject: [PATCH] Fix bug where toggle charts would reset ordering --- components/settings/DashboardSettingsButton.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/settings/DashboardSettingsButton.js b/components/settings/DashboardSettingsButton.js index 8c04aa00..8bdaf311 100644 --- a/components/settings/DashboardSettingsButton.js +++ b/components/settings/DashboardSettingsButton.js @@ -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); }