Skip to content

Commit 4056ef7

Browse files
authored
Fix dropdown selection in admin cluster detail view (#1558)
Summary: A wrong variable reference was causing "unknown cluster" to be selected instead of what the user clicked. Relevant Issues: N/A Type of change: /kind bugfix Test Plan: Visit `/admin/clusters`. Click one. In the dialog that comes up, use the dropdown in the top left to choose another. Now, it should reload the dialog with info for the new cluster correctly. Signed-off-by: Nick Lanam <nlanam@pixielabs.ai>
1 parent 891c1d8 commit 4056ef7

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/ui/src/containers/admin/cluster-details/cluster-details.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,12 @@ const ClusterDetailsNavigationBreadcrumbs = React.memo<{ selectedClusterName: st
113113
.map((c) => ({ value: c.prettyClusterName }));
114114
return { items, hasMoreItems: false };
115115
},
116-
onSelect: (/* input */) => {
116+
onSelect: (input) => {
117117
history.push(getClusterDetailsURL(
118-
clusters.find(({ prettyClusterName }) => prettyClusterName === selectedClusterName)?.clusterName));
118+
clusters.find(({ prettyClusterName }) => prettyClusterName === input)?.clusterName));
119119
},
120120
},
121-
], [clusters, error, history, loading, selectedClusterName, selectedClusterPrettyName]);
121+
], [clusters, error, history, loading, selectedClusterPrettyName]);
122122

123123
return <Breadcrumbs breadcrumbs={breadcrumbs} />;
124124
});

0 commit comments

Comments
 (0)