Skip to content
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

fix: highlight country from preferred list #192

Merged
merged 3 commits into from
Jan 23, 2018
Merged

fix: highlight country from preferred list #192

merged 3 commits into from
Jan 23, 2018

Conversation

denkorolenko
Copy link
Contributor

@denkorolenko denkorolenko commented Jan 23, 2018

When we define a preferredCountries property, we have a list of the preferred countries on the top of the drop-down menu. But when we open a drop-down, the selected country by default will be in general list, not in a preferredCountries list. See a demo:
Alt text

In this case, preferredCountries is hidden from the user. He will not expect to find it and will not look for it.

Instead, let's try to select a country from the preferredCountries list. See a demo:
Alt text

@coveralls
Copy link

coveralls commented Jan 23, 2018

Coverage Status

Coverage increased (+0.01%) to 94.186% when pulling 5bdbb79 on mycsHQ:fix-highlight-country into e9de24d on patw0929:master.

@denkorolenko
Copy link
Contributor Author

denkorolenko commented Jan 23, 2018

I would like to add a unit test, but I have an error after ./node_modules/.bin/jest command:
Cannot find module 'react' from 'RootModal.test.js'
Alt text

yarn test command doesn't work for me, it can't find test file
No tests found related to files changed since last commit.

@patw0929, Do you know what can be a problem?

@patw0929
Copy link
Owner

Awesome! Thank you 👍

The missing module error of react when running test, please install peer dependency packages by following command:

yarn add react@^15.4.2 react-dom@^15.4.2 prop-types@~15.5.8 --peer

@denkorolenko
Copy link
Contributor Author

@patw0929 it works, thanks. I will add a test.

@denkorolenko
Copy link
Contributor Author

I added a small test, @patw0929 could you pls take a look? ;)

@patw0929
Copy link
Owner

LGTM 💯
Thank you for your contribution! Will merge later.

@patw0929 patw0929 merged commit 96c789e into patw0929:master Jan 23, 2018
patw0929 added a commit that referenced this pull request Jan 23, 2018
Bug fixes:

* #192: highlight country from preferred list (by @Denis-K)
@denkorolenko denkorolenko deleted the fix-highlight-country branch January 23, 2018 17:19
andrewsantarin pushed a commit to andrewsantarin/react-intl-tel-input that referenced this pull request Feb 2, 2022
fix: highlight country from preferred list
andrewsantarin pushed a commit to andrewsantarin/react-intl-tel-input that referenced this pull request Feb 2, 2022
Bug fixes:

* patw0929#192: highlight country from preferred list (by @Denis-K)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants