-
Notifications
You must be signed in to change notification settings - Fork 105
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
Feature request: empty country selection #11
Comments
Hmm. Not sure. The way it's built, it definitely expects there to be a country selected. Usually this is handled by setting a default country, or by selecting one or more "preferred" countries to appear at the top of the list, and relying on it to just select the first one by default. If you have a suggestion on how you think this should be handled, I'd be interested to see it. I think that this should be optional behavior, but the ability to have no country selected is a perfectly valid choice in some use cases. |
I would keep the default behavior just the way it's today. But let's say there is an option "allowsEmpty" that makes it possible to have |
Yes, all of that makes sense. The part that I think is actually the wrinkle is around the display of the flag. What is shown in the spot where the flag usually is if nothing is selected? What prompts the user that if they click there, a list of flags and country names will drop down for them to select from? I think leaving it entirely blank doesn't give the user the right information to interact with it. Maybe an "empty" flag would do the trick. Something like this: https://sophiesensei.files.wordpress.com/2014/10/blankflag.png?w=705 |
Empty flag makes sense, perhaps a globe icon would convey the same meaning. |
Did anything end up coming from this? I definitely have a use-case for needing an empty or null defaultCountry on initialization. |
@aaronfischer I'd be happy to accept a pull request. |
I'd like to have an empty country as well. Are there any solutions that can be implemented immediately? Instead of an empty flag, I think the text 'Select a Country' would be most informative. |
Hello! |
Easy workaround who needs this feature:
But obviously a proper solution for possible use-cases "No country" , or "All countries" would be useful |
I would love to see this as well @cnsgithub thanks for your effort, but how do you add the custom values? |
I don't understand. Just add them to the variable (modify the countrySelect file)
|
I had to use js instead of min.js...Following is workaround suggested above and it works fine with me :-
|
One more for today :)
It seems to me there is no straightforward way to "clear" the selection, so that after submitting the form the country value is "empty". The same goes for starting without any country selected.
Am I missing something? If not, how hard would it be to add this possibility?
The text was updated successfully, but these errors were encountered: