fix showing default ns for ingresses on edit (#10196)

pull/10217/head 2.19.0
Prabhat Khera 1 year ago committed by GitHub
parent 1e24451cc9
commit 7abed624d9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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

Loading…
Cancel
Save