diff --git a/webapp/packages/plugin-data-viewer/src/TableViewer/TableGrid.tsx b/webapp/packages/plugin-data-viewer/src/TableViewer/TableGrid.tsx index 0ef76c75e9..c989038793 100644 --- a/webapp/packages/plugin-data-viewer/src/TableViewer/TableGrid.tsx +++ b/webapp/packages/plugin-data-viewer/src/TableViewer/TableGrid.tsx @@ -23,6 +23,7 @@ interface Props { presentation: IDataPresentationOptions; resultIndex: number; simple: boolean; + isStatistics: boolean; } const styles = css` @@ -32,7 +33,7 @@ const styles = css` } `; -export const TableGrid = observer(function TableGrid({ model, actions, dataFormat, presentation, resultIndex, simple }) { +export const TableGrid = observer(function TableGrid({ model, actions, dataFormat, presentation, resultIndex, simple, isStatistics }) { if ((presentation.dataFormat !== undefined && dataFormat !== presentation.dataFormat) || !model.source.hasResult(resultIndex)) { if (model.isLoading()) { return null; @@ -42,11 +43,9 @@ export const TableGrid = observer(function TableGrid({ model, actions, da return Current data can't be displayed by selected presentation; } - const result = model.getResult(resultIndex); - const Presentation = presentation.getPresentationComponent(); - if (result?.loadedFully && !result.data) { + if (isStatistics) { return ; } diff --git a/webapp/packages/plugin-data-viewer/src/TableViewer/TableViewer.tsx b/webapp/packages/plugin-data-viewer/src/TableViewer/TableViewer.tsx index 454c6480d6..e23a9b7508 100644 --- a/webapp/packages/plugin-data-viewer/src/TableViewer/TableViewer.tsx +++ b/webapp/packages/plugin-data-viewer/src/TableViewer/TableViewer.tsx @@ -191,6 +191,7 @@ export const TableViewer = observer( ? dataPresentationService.getSupported(DataPresentationType.toolsPanel, dataFormat, valuePresentationId, dataModel, resultIndex) : null; + const isStatistics = result?.loadedFully && !result.data; const resultExist = dataModel.source.hasResult(resultIndex); const overlay = dataModel.source.results.length > 0 && presentation.dataFormat === dataFormat; const valuePanelDisplayed = @@ -203,16 +204,18 @@ export const TableViewer = observer( return (
- + {!isStatistics && ( + + )}
( presentation={presentation} resultIndex={resultIndex} simple={simple} + isStatistics={isStatistics} /> @@ -263,7 +267,7 @@ export const TableViewer = observer(
- {!simple && ( + {!simple && !isStatistics && (