Skip to content

Commit ddd2c23

Browse files
committed
fix: use all clusters for count
1 parent 5489a64 commit ddd2c23

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

src/components/ResourceBrowser/ResourceBrowser.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,18 @@ const ResourceBrowser: React.FC = () => {
4949
)
5050

5151
const sortedClusterList: ClusterDetail[] = useMemo(
52+
() => sortObjectArrayAlphabetically(detailClusterList || clusterListMinData || [], 'name'),
53+
[detailClusterList, clusterListMinData],
54+
)
55+
56+
const filteredSortedCluserList = useMemo(
5257
() =>
53-
sortObjectArrayAlphabetically(detailClusterList || clusterListMinData || [], 'name').filter(
58+
sortedClusterList.filter(
5459
(option) =>
5560
!(window._env_.HIDE_DEFAULT_CLUSTER && option.id === DEFAULT_CLUSTER_ID) &&
5661
!option.isVirtualCluster,
5762
),
58-
[detailClusterList, clusterListMinData],
63+
[sortedClusterList],
5964
)
6065

6166
const renderContent = () => {
@@ -66,7 +71,7 @@ const ResourceBrowser: React.FC = () => {
6671
return (
6772
<ClusterListView
6873
parentRef={parentRef}
69-
clusterOptions={sortedClusterList}
74+
clusterOptions={filteredSortedCluserList}
7075
clusterListLoader={detailClusterListLoading}
7176
initialLoading={initialLoading}
7277
refreshData={reloadDetailClusterList}

0 commit comments

Comments
 (0)