You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Apr 12, 2024. It is now read-only.
Just to set up the context:
In some part of an app, I use a select (using a string as both label and value) with a ng-model to set a default value and to retrieve the new values selected by the user. The ng-model variable is set to a given value, but the select still appears as nothing was selected.
Suspected cause: this function expects a value but this call sends it a label, causing this line to unselect all options (as this is not a known value). In my case, the received argument value is indeed the string label of the option, where the actual value of the option (according to the jQuery component) seems to be a numerical index.
Just for the record, I solved my problem by commenting this line (but I can imagine this causes other issues I am not aware of).
Bug present in 1.3.0, but not in 1.3.0-rc.2 (or at least visible).
Unfortunately, I am not able to reproduce it in a visible way with a jsfiddle. I think the reason is that the guilty function is not called if the configuration of the select already match the desired configuration). The exact cause why this is the case in my code and not in the jsfiddle I tried is unknown (maybe because the original code is triggered in a modal triggered by a premise triggered by a response from the HTTP service... I can try to pinpoint it if you think this may be useful, but it may take some times).
This jsfiddle trigger the bug, but not in a visible way (as render() seems to be called a second time that corrects the issue in that case). You can put a breakpoint on the line 25'024 of angular.js to see the issue.
Thank you for your time!
[edit]
Ok, I can finally reproduce it in a visible way: it happens when you fill the list for the select after you have set a selected value. Relevant jsfiddle.
[edit 2]
Apparently, not all browsers are affected. Bug visible when using Chromium 37 (Ubuntu 14.04 64 bits) or IE9 (Windows 7 VM 32 bits), but not when using Firefox 32 (Ubuntu 14.04 64 bits).
The text was updated successfully, but these errors were encountered:
joelross
changed the title
ngSelect sometimes appears unselected (when it is not)
ngSelect appears unselected when filled after selected value is set
Oct 20, 2014
Is this related to the other bug report #9714. If not then hopefully both issues could be fixed together. #9714 is a big problem for us. We had to go back to 1.3 rc5. Looks like one of the bug "fixes" in 1.3.0 caused the problem. Hope a fix for this can be given some priority.
Hello,
Just to set up the context:
In some part of an app, I use a select (using a string as both label and value) with a ng-model to set a default value and to retrieve the new values selected by the user. The ng-model variable is set to a given value, but the select still appears as nothing was selected.
Suspected cause: this function expects a value but this call sends it a label, causing this line to unselect all options (as this is not a known value). In my case, the received argument
value
is indeed the string label of the option, where the actual value of the option (according to the jQuery component) seems to be a numerical index.Just for the record, I solved my problem by commenting this line (but I can imagine this causes other issues I am not aware of).
Bug present in 1.3.0, but not in 1.3.0-rc.2 (or at least visible).
Unfortunately, I am not able to reproduce it in a visible way with a jsfiddle. I think the reason is that the guilty function is not called if the configuration of the select already match the desired configuration). The exact cause why this is the case in my code and not in the jsfiddle I tried is unknown (maybe because the original code is triggered in a modal triggered by a premise triggered by a response from the HTTP service... I can try to pinpoint it if you think this may be useful, but it may take some times).
This jsfiddle trigger the bug, but not in a visible way (as
render()
seems to be called a second time that corrects the issue in that case). You can put a breakpoint on the line 25'024 of angular.js to see the issue.Thank you for your time!
[edit]
Ok, I can finally reproduce it in a visible way: it happens when you fill the list for the select after you have set a selected value. Relevant jsfiddle.
[edit 2]
Apparently, not all browsers are affected. Bug visible when using Chromium 37 (Ubuntu 14.04 64 bits) or IE9 (Windows 7 VM 32 bits), but not when using Firefox 32 (Ubuntu 14.04 64 bits).
The text was updated successfully, but these errors were encountered: