react-intl-phone3

0.3.2 • Public • Published

React-Intl-Phone3

Highly customizable phone input component with auto formatting. This is a version of the existing react-phone-input-2 with fixes for area code exclusion. Everything in here except for the fix is from https://github.com/bl00mber/react-phone-input-2.

For usage and abilities please see: https://github.com/bl00mber/react-phone-input-2 If this connection is severed, please contact me to revert readme back to usage.

Additional feature(s):

autoSelectCountry - Allows country guessing to be turned on/off. Default is true. Turning off will default to the defaultCountry. This is best used when autoFill is triggered. This will ensure that country is not guessed and forces the user to change the flag drop down to select dialcode

autoSelectCountry - { boolean } "true" by default

autoSelectCountry={false}

Best use case for autoSelectCountry:

autoSelectCountry={false}
autoFormat={false}
autoPlaceholder={false}
countryCodeEditable={false}
defaultCountry={[// passed default country 2 letter iso code]}
disableAreaCodes={true}
disableCountryCode={false}
disableSearchIcon={true}

cleanAutoFill = { boolean } "false" by default

It has been noticed that autofill (mostly chrome) has a long standing error where it is appending a 0 to countries with a non-standard format. This function clears the 0 value at posiiton 0 if present on assumed autofill

cleanAutoFill={true}

Contributing

Code style changes not allowed

License

GitHub license

Based on react-phone-input-2

Package Sidebar

Install

npm i react-intl-phone3

Weekly Downloads

3

Version

0.3.2

License

MIT

Unpacked Size

167 kB

Total Files

6

Last publish

Collaborators

  • khippert5