From d4bea3326a2d2462a9a69f5694a45eb12ed34c1e Mon Sep 17 00:00:00 2001 From: maryliag Date: Wed, 12 Oct 2022 17:40:38 -0400 Subject: [PATCH] ui: fix undefined table stats Previously, if no value was being passed as totalCount, the table stats were showing an "undefined value". This commit as a default value as 0 for the total. Fixes #89869 Release note (bug fix): show correct value on table stats on UI, when there is no values to show. --- .../cluster-ui/src/tableStatistics/tableStatistics.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/ui/workspaces/cluster-ui/src/tableStatistics/tableStatistics.tsx b/pkg/ui/workspaces/cluster-ui/src/tableStatistics/tableStatistics.tsx index e29f53eb78ed..eecbd405eda4 100644 --- a/pkg/ui/workspaces/cluster-ui/src/tableStatistics/tableStatistics.tsx +++ b/pkg/ui/workspaces/cluster-ui/src/tableStatistics/tableStatistics.tsx @@ -36,7 +36,7 @@ interface TableStatistics { // This component has also a clear filter option. export const TableStatistics: React.FC = ({ pagination, - totalCount, + totalCount = 0, search, arrayItemName, onClearFilters,