-
Notifications
You must be signed in to change notification settings - Fork 305
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
ENH: Phone Input Component #189
ENH: Phone Input Component #189
Conversation
@JhumanJ Hey, were you able to take a look at this one yet? |
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.
Hey, it looks better but please give your PR a try:
- It misses the package in
composer.json
- It misses the data files for the list of countries
}, | ||
watch: { | ||
inputVal(newVal, oldVal) { | ||
this.compVal = this.selectedCountryCode.dial_code + newVal; |
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.
Please make sure to read all requirements
It should handle clashes for instance, for French number you don't need +33 and start with a 0, so if user selects +33 for France, and enters 0123456789, the resulting value should not be +330123456789 but +330123456789
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.
I'm not sure if I'm reading it right but do you mean that the result should be +33123456789 instead of +330123456789, with the extra 0 ignored?
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.
Have added the new logic to handle this scenario, please take a look
… 0 phone number is ignored, added regex to ignore non digit phone input
…170-phone-input-component
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.
Great progress, almost there. Please check the review comments, and make sure to read all requirements from #170. Thanks for the great work!
</script> | ||
|
||
<style scoped> | ||
.dropdown { |
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.
Please stick to tailwind. We avoid css as much as possible, and usually don't use actual classes. Ex:
- Remove the class
dropdown
and replace it withrelative w-1/4
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.
Done, using tailwind classes. Also, added a prop to the VSelect component as I wanted the opened dropdown options to have greater width than the selected option when dropdown closed. Do take a look at that
… prop for dropdown styling
…htritus/OpnForm into feat/170-phone-input-component
Great job, thank you @Ahtritus ! |
/claim #170 |
Hey @JhumanJ, made some more changes, do take a look now. Hope this is the expected behavior.
/claim #170