fix showing default ns for ingresses on edi (#10197)

pull/10205/head
Prabhat Khera 2023-08-29 15:12:49 +12:00 committed by GitHub
parent 4ca45e89c5
commit 6d203033c1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -117,9 +117,10 @@ export function IngressForm({
useEffect(() => {
const namespaces = namespacesOptions.map((option) => option.value);
if (
!isEdit &&
!namespaces.includes(namespace) &&
namespaces.length > 0 &&
(!isIngressNamesLoading || isEdit)
!isIngressNamesLoading
) {
handleNamespaceChange(namespaces[0]);
}