From 1bbe17e988bf624ce5ab40dae5ff751e1230220c Mon Sep 17 00:00:00 2001 From: Henry Liu Date: Fri, 30 Aug 2024 02:53:11 +0800 Subject: [PATCH] fix(ui): fix create app panel reappear after closed (#19717) Signed-off-by: henry.liu --- .../application-create-panel/application-create-panel.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ui/src/app/applications/components/application-create-panel/application-create-panel.tsx b/ui/src/app/applications/components/application-create-panel/application-create-panel.tsx index 40190ea0ff051..4ccda11065605 100644 --- a/ui/src/app/applications/components/application-create-panel/application-create-panel.tsx +++ b/ui/src/app/applications/components/application-create-panel/application-create-panel.tsx @@ -119,7 +119,11 @@ export const ApplicationCreatePanel = (props: { } else { setDestFormat('URL'); } - }, []); + + return () => { + debouncedOnAppChanged.cancel(); + }; + }, [debouncedOnAppChanged]); function normalizeTypeFields(formApi: FormApi, type: models.AppSourceType) { const appToNormalize = formApi.getFormState().values;