Open sirugh opened 4 years ago
Hi @sirugh. Thank you for your report. To help us process this issue please make sure that you provided sufficient information.
Please, add a comment to assign the issue: @magento I am working on this
@sirugh i think we can close it rigth
@larsroettig why do you think that? Doesn't look like either of my proposed solutions have made it :P
@magento export issue to JIRA project PWA as Story
:white_check_mark: Jira issue https://jira.corp.magento.com/browse/PWA-1774 is successfully created for this GitHub issue.
Is your feature request related to a problem? Please describe. The region input field is currently always required although some countries do not use them or require them.
https://github.com/magento/pwa-studio/pull/2659#issuecomment-682238724
If someone wants to make the region field optional they have to duplicate the component just to remove the
validate
prop on the region field.Describe the solution you'd like
1) Allow for configuration to inform the UI whether region is required or not. 2) Surface this configuration in a GQL query, probably the countries query
Describe alternatives you've considered
One alternative would be to remove the
validate
prop on the region field implementations. It would then fall to the user to submit the form to find out if the region is required or not. I would prefer not to do this.Additional context
https://github.com/magento/pwa-studio/pull/2659#issuecomment-682238724
Please let us know what packages this feature is in regards to:
venia-concept
venia-ui
pwa-buildpack
peregrine
pwa-devdocs
upward-js
upward-spec
create-pwa