-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
bug: select is not checking the option with checked on it #7334
Comments
I'm curious as to how this should behave. Let's say that the gender variable would be "m" in this situation. What should the select do after initialization? Check "f" or "m"? Or set "gender" to "f" directly? |
@Kobzol That's true. I created this issue because it used to work, but it seems like a
then it will choose to prioritize the value of Here's a sample plunker that can be modified to show the above: http://plnkr.co/edit/x14JI1KGB4hUzpB9AYac?p=preview |
I guess it's a reasonable behaviour to give precedence to the ngModel. Though Ionic's |
BREAKING CHANGES: The Option component’s `checked` attribute has been renamed to `selected` in order to select an option. This is to the follow the MDN spec for a select option: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/option If a `ngModel` is added to the Select component the value of the `ngModel` will take precedence over the `selected` attribute. references #7334
Hi, I encounter similar problems with my ion-select components. for example : When built on targets iPhone or Galaxy sometimes I get selection issues, sometimes the scroll is not fluid or keeps frozen inside the select, sometimes everything works fine, it doesn't look like a performance issue because nothing heavy is running in the background of my app or my phones. |
why this dosent work but work with the
|
till now no solution found??? |
what i did was after executing all the line of codes in the ionChange event i made [(ngModel)] value null.. |
I have tested this in the v4 version and I am no longer able to reproduce this:
Please note that the correct property is |
I did workaround.In constructor i have set ngModel value for which i thought of keeping default selected value.
This way default value is getting selected |
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
The following test failed on snapshot: select/single-value
Relevant code:
The text was updated successfully, but these errors were encountered: