diff options
Diffstat (limited to 'packages/anastasis-webui/src/components/fields/EmailInput.tsx')
-rw-r--r-- | packages/anastasis-webui/src/components/fields/EmailInput.tsx | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/packages/anastasis-webui/src/components/fields/EmailInput.tsx b/packages/anastasis-webui/src/components/fields/EmailInput.tsx index fe676f284..4c35c0686 100644 --- a/packages/anastasis-webui/src/components/fields/EmailInput.tsx +++ b/packages/anastasis-webui/src/components/fields/EmailInput.tsx @@ -7,6 +7,7 @@ export interface TextInputProps { error?: string; placeholder?: string; tooltip?: string; + onConfirm?: () => void; bind: [string, (x: string) => void]; } @@ -37,6 +38,11 @@ export function EmailInput(props: TextInputProps): VNode { placeholder={props.placeholder} type="email" class={showError ? "input is-danger" : "input"} + onKeyPress={(e) => { + if (e.key === 'Enter' && props.onConfirm) { + props.onConfirm() + } + }} onInput={(e) => { setDirty(true); props.bind[1]((e.target as HTMLInputElement).value); |