Skip to content

Commit

Permalink
Fix dropdown selection in admin cluster detail view (#1558)
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
NickLanam authored Jun 22, 2023
1 parent 891c1d8 commit 4056ef7
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,12 @@ const ClusterDetailsNavigationBreadcrumbs = React.memo<{ selectedClusterName: st
.map((c) => ({ value: c.prettyClusterName }));
return { items, hasMoreItems: false };
},
onSelect: (/* input */) => {
onSelect: (input) => {
history.push(getClusterDetailsURL(
clusters.find(({ prettyClusterName }) => prettyClusterName === selectedClusterName)?.clusterName));
clusters.find(({ prettyClusterName }) => prettyClusterName === input)?.clusterName));
},
},
], [clusters, error, history, loading, selectedClusterName, selectedClusterPrettyName]);
], [clusters, error, history, loading, selectedClusterPrettyName]);

return <Breadcrumbs breadcrumbs={breadcrumbs} />;
});
Expand Down

0 comments on commit 4056ef7

Please sign in to comment.