Skip to content

Commit

Permalink
fix(auth): remove defaultLabel for required capture fields
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristiaanScheermeijer committed Aug 4, 2021
1 parent bd475ab commit 57d405b
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
9 changes: 8 additions & 1 deletion src/components/PersonalDetailsForm/PersonalDetailsForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,14 @@ const PersonalDetailsForm: React.FC<Props> = ({
return <Radio values={values} value={questionValues[key]} header={question} {...props} />;
} else if (values.length > 2) {
return (
<Dropdown options={values} value={questionValues[key]} label={question} defaultLabel={t('personal_details.no_answer')} {...props} fullWidth />
<Dropdown
options={values}
value={questionValues[key]}
label={question}
defaultLabel={!props.required ? t('personal_details.select_answer') : undefined}
{...props}
fullWidth
/>
);
}

Expand Down
2 changes: 1 addition & 1 deletion src/i18n/locales/en_US/account.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,9 +90,9 @@
"continue": "Continue",
"fist_name": "First name",
"last_name": "Last name",
"no_answer": "No answer",
"phone_number": "Phone number",
"post_code": "Zip/Postal Code",
"select_answer": "Choose an option",
"state": "State/Province/Region",
"this_field_is_required": "This field is required",
"title": "Personal details"
Expand Down
2 changes: 1 addition & 1 deletion src/i18n/locales/nl_NL/account.json
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,9 @@
"continue": "",
"fist_name": "",
"last_name": "",
"no_answer": "",
"phone_number": "",
"post_code": "",
"select_answer": "",
"state": "",
"this_field_is_required": "",
"title": ""
Expand Down

0 comments on commit 57d405b

Please sign in to comment.