fix reloading page when ing class disallowed (#7830)

pull/7878/head
Prabhat Khera 2022-10-17 10:44:17 +13:00 committed by GitHub
parent 191f8e17ee
commit 669327da7c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -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,