From dc069418033b5c7ef17abfaf824a6b0a923f120a Mon Sep 17 00:00:00 2001 From: Szymon Kania <26521377+ostatni5@users.noreply.github.com> Date: Tue, 17 Oct 2023 21:30:15 +0200 Subject: [PATCH] Use name of page in `key` in results (#1275) * Use name of page in `key` in results * Disable grouping on input files --- src/JsRoot/GraphData.tsx | 2 +- .../components/Results/ResultsPanel.tsx | 39 ++++++++++++++----- src/shared/components/tooltip/InfoTooltip.tsx | 6 ++- 3 files changed, 36 insertions(+), 11 deletions(-) diff --git a/src/JsRoot/GraphData.tsx b/src/JsRoot/GraphData.tsx index ddfcfacac..eb380dae2 100644 --- a/src/JsRoot/GraphData.tsx +++ b/src/JsRoot/GraphData.tsx @@ -182,7 +182,7 @@ export function generateGraphs( .map(({ page, graph, filter }, idx) => { return ( diff --git a/src/WrapperApp/components/Results/ResultsPanel.tsx b/src/WrapperApp/components/Results/ResultsPanel.tsx index aee50a45a..1ef1df045 100644 --- a/src/WrapperApp/components/Results/ResultsPanel.tsx +++ b/src/WrapperApp/components/Results/ResultsPanel.tsx @@ -14,6 +14,7 @@ import { SyntheticEvent, useEffect, useState } from 'react'; import { Estimator, generateGraphs, isPage0d, Page, Page0D } from '../../../JsRoot/GraphData'; import { useDialog } from '../../../services/DialogService'; import { useStore } from '../../../services/StoreService'; +import { InfoTooltip } from '../../../shared/components/tooltip/InfoTooltip'; import { titleToKebabCase } from '../../../ThreeEditor/components/Dialog/CustomDialog'; import { TabPanel } from '../Panels/TabPanel'; import TablePage0D from './ResultsTable'; @@ -60,6 +61,8 @@ function ResultsPanel() { return estimatorResults; }; + const resultsGeneratedFromProjectFile = !!simulation?.input.inputJson; + return ( - setGroupQuantities(e.target.checked)} + + setGroupQuantities(e.target.checked)} + disabled={!resultsGeneratedFromProjectFile} + /> + } + label='Group Quantities' + /> + {!resultsGeneratedFromProjectFile && ( + - } - label='Group Quantities' - /> + )} +