diff options
author | Sebastian <sebasjm@gmail.com> | 2021-11-12 13:12:27 -0300 |
---|---|---|
committer | Sebastian <sebasjm@gmail.com> | 2021-11-12 13:12:27 -0300 |
commit | 38b84bb8051db2f03b152d66c34a1cb4c8944a12 (patch) | |
tree | 1e7a23bacb5287a53da51f93faee8667292c56ee /packages/anastasis-webui/src/pages/home/AttributeEntryScreen.tsx | |
parent | 377e78e8543b67c22798479fcf2d2f8d1dae5b28 (diff) | |
download | wallet-core-38b84bb8051db2f03b152d66c34a1cb4c8944a12.tar.xz |
fix #7059
Diffstat (limited to 'packages/anastasis-webui/src/pages/home/AttributeEntryScreen.tsx')
-rw-r--r-- | packages/anastasis-webui/src/pages/home/AttributeEntryScreen.tsx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/packages/anastasis-webui/src/pages/home/AttributeEntryScreen.tsx b/packages/anastasis-webui/src/pages/home/AttributeEntryScreen.tsx index 4a937d855..1b50779e0 100644 --- a/packages/anastasis-webui/src/pages/home/AttributeEntryScreen.tsx +++ b/packages/anastasis-webui/src/pages/home/AttributeEntryScreen.tsx @@ -44,6 +44,11 @@ export function AttributeEntryScreen(): VNode { setValue={(v: string) => setAttrs({ ...attrs, [spec.name]: v })} spec={spec} errorMessage={error} + onConfirm={() => { + if (!hasErrors) { + setAskUserIfSure(true) + } + }} value={value} /> ); @@ -104,6 +109,7 @@ interface AttributeEntryFieldProps { setValue: (newValue: string) => void; spec: UserAttributeSpec; errorMessage: string | undefined; + onConfirm: () => void; } const possibleBirthdayYear: Array<number> = []; for (let i = 0; i < 100; i++) { @@ -117,6 +123,7 @@ function AttributeEntryField(props: AttributeEntryFieldProps): VNode { grabFocus={props.isFirst} label={props.spec.label} years={possibleBirthdayYear} + onConfirm={props.onConfirm} error={props.errorMessage} bind={[props.value, props.setValue]} /> @@ -125,6 +132,7 @@ function AttributeEntryField(props: AttributeEntryFieldProps): VNode { <PhoneNumberInput grabFocus={props.isFirst} label={props.spec.label} + onConfirm={props.onConfirm} error={props.errorMessage} bind={[props.value, props.setValue]} /> @@ -133,6 +141,7 @@ function AttributeEntryField(props: AttributeEntryFieldProps): VNode { <TextInput grabFocus={props.isFirst} label={props.spec.label} + onConfirm={props.onConfirm} error={props.errorMessage} bind={[props.value, props.setValue]} /> |