-
Notifications
You must be signed in to change notification settings - Fork 186
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
updated country selector #10354
base: main
Are you sure you want to change the base?
updated country selector #10354
Conversation
app/webpacker/components/ContactEditProfilePage/EditProfileForm.jsx
Outdated
Show resolved
Hide resolved
app/webpacker/components/ContactEditProfilePage/EditProfileForm.jsx
Outdated
Show resolved
Hide resolved
@@ -102,13 +100,10 @@ export default function EditProfileForm({ | |||
onChange={handleFormChange} | |||
required | |||
/> | |||
<Form.Select | |||
options={countryOptions} | |||
<CountrySelector | |||
label={i18n.t('activerecord.attributes.user.country_iso2')} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
label
is not a supported property by CountrySelector
.
value={editedProfileDetails?.country_iso2} | ||
onChange={handleFormChange} | ||
selected={editedProfileDetails?.country_iso2} | ||
onChange={(event, data) => handleFormChange(null, { name: 'country_iso2', value: data.value })} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you keep passing in name
(not sure why you deleted that in the first place), then just keeping onChange={handleFormChange}
should work
@MichaScant I'd like to do some CSS cleanups which depend on getting this PR merged. |
…tion.org into edit_profile_form_disallow_multiple_countries
Fixed the issue, where we shouldn't allow multiple countries to be selected. To fix this I replaced the country selector of EditProfileForm with the existing CountrySelector.
Issue: #10283