From 669327da7c38114f841348c9e09f1ebfde86859a Mon Sep 17 00:00:00 2001 From: Prabhat Khera <91852476+prabhat-org@users.noreply.github.com> Date: Mon, 17 Oct 2022 10:44:17 +1300 Subject: [PATCH] fix reloading page when ing class disallowed (#7830) --- .../ingresses/CreateIngressView/CreateIngressView.tsx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/kubernetes/react/views/networks/ingresses/CreateIngressView/CreateIngressView.tsx b/app/kubernetes/react/views/networks/ingresses/CreateIngressView/CreateIngressView.tsx index 7a1ad6ba0..a8d715936 100644 --- a/app/kubernetes/react/views/networks/ingresses/CreateIngressView/CreateIngressView.tsx +++ b/app/kubernetes/react/views/networks/ingresses/CreateIngressView/CreateIngressView.tsx @@ -175,7 +175,7 @@ export function CreateIngressView() { (!existingIngressClass || (existingIngressClass && !existingIngressClass.Availability)) && ingressRule.IngressClassName && - ingressControllersResults.data + !ingressControllersResults.isLoading ) { ingressClassOptions.push({ label: !ingressRule.IngressType @@ -206,7 +206,7 @@ export function CreateIngressView() { !!params.name && ingressesResults.data && !ingressRule.IngressName && - ingressControllersResults.data + !ingressControllersResults.isLoading ) { // if it is an edit screen, prepare the rule from the ingress const ing = ingressesResults.data?.find( @@ -221,6 +221,7 @@ export function CreateIngressView() { setIngressRule(r); } } + // eslint-disable-next-line react-hooks/exhaustive-deps }, [ params.name, ingressesResults.data,