diff --git a/frontend/src/components/common/NamespacesAutocomplete.tsx b/frontend/src/components/common/NamespacesAutocomplete.tsx index 97ff32e8c0..10c4b0c39d 100644 --- a/frontend/src/components/common/NamespacesAutocomplete.tsx +++ b/frontend/src/components/common/NamespacesAutocomplete.tsx @@ -157,7 +157,11 @@ function NamespacesFromClusterAutocomplete( ) { const [namespacesList] = Namespace.useList(); const namespaceNames = useMemo( - () => namespacesList?.map(namespace => namespace.metadata.name) ?? [], + () => + namespacesList + ?.map(namespace => namespace.metadata.name) + .slice() + .sort((a, b) => a.localeCompare(b)) ?? [], [namespacesList] );