aboutsummaryrefslogtreecommitdiff
path: root/packages/anastasis-webui/src/components/fields/EmailInput.tsx
diff options
context:
space:
mode:
authorSebastian <sebasjm@gmail.com>2021-11-12 13:12:27 -0300
committerSebastian <sebasjm@gmail.com>2021-11-12 13:12:27 -0300
commit38b84bb8051db2f03b152d66c34a1cb4c8944a12 (patch)
tree1e7a23bacb5287a53da51f93faee8667292c56ee /packages/anastasis-webui/src/components/fields/EmailInput.tsx
parent377e78e8543b67c22798479fcf2d2f8d1dae5b28 (diff)
downloadwallet-core-38b84bb8051db2f03b152d66c34a1cb4c8944a12.tar.xz
fix #7059
Diffstat (limited to 'packages/anastasis-webui/src/components/fields/EmailInput.tsx')
-rw-r--r--packages/anastasis-webui/src/components/fields/EmailInput.tsx6
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);