patw0929 / react-intl-tel-input

Rewrite International Telephone Input in React.js. (Looking for maintainers, and PRs & contributors are also welcomed!)
https://patw0929.github.io/react-intl-tel-input/
MIT License
284 stars 220 forks source link

Add optional onPhoneNumberFocus function #308

Closed johannessjoberg closed 5 years ago

johannessjoberg commented 5 years ago

Added optional onPhoneNumberFocus function, similar to onPhoneNumberBlur.

Description

Added onPhoneNumberFocus because it's not possible to extended onFocus in telInputProps property due to onFocus being overwritten in src/components/TelInput.js. There is an open PR addressing the same thing in #239, but it has been stale for some time and lack tests.

Types of changes

Checklist:

coveralls commented 5 years ago

Coverage Status

Coverage increased (+0.08%) to 93.656% when pulling 0362b6bc18119b3b210d3fa9713a1167715a6f3b on DPOrganizer:feature/on-phone-number-focus into ced4b09318d62c62e33285b215ca0118214c3bf1 on patw0929:master.

patw0929 commented 5 years ago

Thanks a lot! Looks great! πŸ™Œ Could you help to update Documentation - Props?

johannessjoberg commented 5 years ago

Thanks @patw0929! From what I understood the Props storybook automatically picks things from IntlTelInput.propTypes so it should already be in place ☺️

patw0929 commented 5 years ago

You're right! I forgot it πŸ˜… Thank you! Merged & released as v7.1.0.

johannessjoberg commented 5 years ago

Thanks @patw0929 for the fast response and feedback! Great lib! πŸ‘