From 056126bdc4abc9dd86bac5024e6caea4c5ad0b42 Mon Sep 17 00:00:00 2001 From: Walter Buczacka Date: Thu, 5 Sep 2024 16:08:53 -0300 Subject: [PATCH] fix types in footer --- src/components/TableFooter.tsx | 6 ++++-- src/components/TableView.tsx | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/TableFooter.tsx b/src/components/TableFooter.tsx index aa5c8d1..752f513 100644 --- a/src/components/TableFooter.tsx +++ b/src/components/TableFooter.tsx @@ -18,11 +18,12 @@ import {selectLoadingState} from "../state/loading"; type TData = Record & Record; type Props = {table: MRT_TableInstance} & Pick & { data?: Record[]; + isLoading: boolean; }; function TableFooter(props: Props) { const loading = useSelector(selectLoadingState); - const {result, table, data = []} = props; + const {result, table, data = [], isLoading} = props; const {translate: t} = useTranslation(); const {url} = result; @@ -44,7 +45,7 @@ function TableFooter(props: Props) { gap="sm" > - {!loading.loading && ( + {!loading.loading && !isLoading && ( {totalRowCount && {t("results.count_rows", {n: totalRowCount})}} {showPagination && } @@ -60,6 +61,7 @@ type ApiAndCsvButtonsProps = { copied: boolean; copyHandler: () => void; url: string; + data: Record[]; }; const ApiAndCsvButtons: React.FC = props => { const {copied, copyHandler, url, data} = props; diff --git a/src/components/TableView.tsx b/src/components/TableView.tsx index 1f142c3..cf4d71d 100644 --- a/src/components/TableView.tsx +++ b/src/components/TableView.tsx @@ -763,7 +763,7 @@ export function TableView({table, result, isError, isLoading = false, data, colu {!isData && !isError && !isLoading && } - + );