From 7abed624d9320f673ecff219a48acaa6090dd0f1 Mon Sep 17 00:00:00 2001 From: Prabhat Khera <91852476+prabhat-org@users.noreply.github.com> Date: Tue, 29 Aug 2023 15:12:40 +1200 Subject: [PATCH] fix showing default ns for ingresses on edit (#10196) --- .../kubernetes/ingresses/CreateIngressView/IngressForm.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/react/kubernetes/ingresses/CreateIngressView/IngressForm.tsx b/app/react/kubernetes/ingresses/CreateIngressView/IngressForm.tsx index f5c997f1531cf..36e4749761c87 100644 --- a/app/react/kubernetes/ingresses/CreateIngressView/IngressForm.tsx +++ b/app/react/kubernetes/ingresses/CreateIngressView/IngressForm.tsx @@ -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]); }