-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Allow using 0 as a key in MdSelect #5024
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
Conversation
fix(select): allow using 0 as a key when using integers as keys, the value 0 is evaluated as an empty selection, because of the falsey condition instead, we should be explicitly checking for null, empty string or undefined.
I'm not sure what this is fixing. It's already possible to select 0. |
@eyalhakim can you elaborate on what you're trying to solve? |
Hi guys, I am trying to solve the very issue @crisbeto recreated in his plunker. However, in my environment, the same (or probably very similar) scenario doesn't work, unless i use the fix that i proposed here. Any ideas how i can replicate my issue here? i also use the latest version of angular material. |
The fix that allowed falsy values to be selected got merged a few days ago (see 2e3910c). If you're using the latest stable version, you don't have it yet. You can either wait for the next release or install the latest master build:
|
ah-ha, perfect, thanks |
@crisbeto for some reason, the indigo-pink theme is not included with this package. |
It should be in there, but the location might've changed. |
Couldn't find it, could you direct me to the right path? |
Sorry @eyalhakim, it seems like the prebuilt themes got broken at some point. They should be fixed by #5042. |
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
fix(select): allow using 0 as a key
when using integers as keys, the value 0 is evaluated as an empty selection, because of the falsey condition instead, we should be explicitly checking for null, empty string or undefined.