diff --git a/src/components/ConnectionsSettingsModal.tsx b/src/components/ConnectionsSettingsModal.tsx index bfaf205..1b6e819 100644 --- a/src/components/ConnectionsSettingsModal.tsx +++ b/src/components/ConnectionsSettingsModal.tsx @@ -47,9 +47,9 @@ const TagClientSourceIPWithNameForm: Component = () => { const [t] = useI18n() - const { form } = createForm>({ + const { form, reset } = createForm>({ extend: validator({ schema }), - onSubmit: ({ tagName, sourceIP }) => + onSubmit: ({ tagName, sourceIP }) => { setClientSourceIPTags((tags) => { if ( tags.some( @@ -60,7 +60,10 @@ const TagClientSourceIPWithNameForm: Component = () => { } return [...tags, { tagName, sourceIP }] - }), + }) + + reset() + }, }) return ( @@ -220,12 +223,12 @@ export const ConnectionsSettingsModal = (props: {
-
+
{({ tagName, sourceIP }) => ( -
+
- {tagName}({sourceIP}) + {tagName} ({sourceIP})