From 7242a3179006a48860910f7a1106621a56abc444 Mon Sep 17 00:00:00 2001 From: ediv Date: Fri, 3 Dec 2021 09:40:22 +0200 Subject: [PATCH] fix: fixed behavior when the user could add new namespace to the list of namespaces --- .../NewResourceWizard/NewResourceWizard.tsx | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/components/organisms/NewResourceWizard/NewResourceWizard.tsx b/src/components/organisms/NewResourceWizard/NewResourceWizard.tsx index 096a131ffe..9547bfd82d 100644 --- a/src/components/organisms/NewResourceWizard/NewResourceWizard.tsx +++ b/src/components/organisms/NewResourceWizard/NewResourceWizard.tsx @@ -200,11 +200,8 @@ const NewResourceWizard = () => { )); }; - const onSelectChange = (value: string) => { - if (value.startsWith(NEW_ITEM)) { - setNamespaces([...namespaces, inputValue]); - form.setFieldsValue({namespace: inputValue}); - } + const onSelectChange = () => { + setInputValue(''); }; useHotkeys( @@ -298,14 +295,14 @@ const NewResourceWizard = () => { >