-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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
md-select deselects when the value is 0 (instead of selecting the item with value of zero) #5031
Comments
This has been fixed in master and will be in the next release. See 2e3910c. |
Perfect. Thanks |
I checked the link and I guess it's a different issue. My problem is that when my ngModel is zero, instead of selecting the option zero, it deselects it all. |
It should be the same issue. Can you reproduce it in a Plunkr? You can use this one which runs the latest build. |
If you believe so, I trust you. I will when I get a chance. |
We had a similar PR today and I wasn't able to reproduce it in this Plunkr. I'm not sure whether you have a different setup though. |
Here is the plunker: but I'm getting a strange error: |
It's because the template doesn't include the |
Thank you for fixing the issue. Is the plunker you sent the one in dev (fixed) or beta 6 (released)? |
The Plunkr is using the latest |
Perfect! so it's fixed. |
Any idea when the next release is that will deliver this fix? |
Good question. I would love to know too. |
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. |
Bug, feature request, or proposal:
Bug
What is the expected behavior?
Selecting the value 0
What is the current behavior?
Deselects everything
What are the steps to reproduce?
One your changes for version beta 6 is:
"select: allow option with undefined or null value to clear selection (#3141) (13524c1), closes #3110 #2634"
This causes the issue of deselecting if the value is 0. So it deselects the mdselect if it's null or undefined or zero.
Providing a Plunker (or similar) is the best way to get the team to see your issue.
Plunker template: https://goo.gl/DlHd6U
What is the use-case or motivation for changing an existing behavior?
Which versions of Angular, Material, OS, TypeScript, browsers are affected?
beta 6
Is there anything else we should know?
The text was updated successfully, but these errors were encountered: