From f5925f0ea7000d942da812ca0edc7381c6f1971b Mon Sep 17 00:00:00 2001 From: Marcel Gerber Date: Tue, 20 Aug 2024 17:55:30 +0100 Subject: [PATCH] enhance: address review comment --- site/multiDim/MultiDimDataPageContent.tsx | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/site/multiDim/MultiDimDataPageContent.tsx b/site/multiDim/MultiDimDataPageContent.tsx index 9166e3be796..f1d16824ad5 100644 --- a/site/multiDim/MultiDimDataPageContent.tsx +++ b/site/multiDim/MultiDimDataPageContent.tsx @@ -171,12 +171,10 @@ export const MultiDimDataPageContent = ({ ) const titleFragments = useTitleFragments(config) - const [initialChoices] = useState(() => - initialQueryStr + const [currentSettings, setCurrentSettings] = useState(() => { + const initialChoices = initialQueryStr ? extractDimensionChoicesFromQueryStr(initialQueryStr, config) : {} - ) - const [currentSettings, setCurrentSettings] = useState(() => { const { selectedChoices } = config.filterToAvailableChoices(initialChoices) return selectedChoices