This repository has been archived by the owner on Oct 2, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Issues when using values ''
and false
#1328
Comments
Can you post a reproduction via Plunker just for assistance with debugging for anyone who wants to look at this closer? This does sound like an issue though. |
Here is a plunkr showing the issue. |
The suggested fix appears to work in plunkr, will also need a test though. @fiznool can you put together a PR? |
fiznool
added a commit
to fiznool/ui-select
that referenced
this issue
Apr 16, 2016
Use triple equals to determine if the selection matches one of the choices. Fixes angular-ui#1328
fiznool
added a commit
to fiznool/ui-select
that referenced
this issue
Apr 16, 2016
Use triple equals to determine if the selection matches one of the choices. Fixes angular-ui#1328
@user378230 submitted a PR. |
fcaballero
pushed a commit
to fcaballero/ui-select
that referenced
this issue
Apr 17, 2016
Use triple equals to determine if the selection matches one of the choices. Fixes angular-ui#1328 fix(indentation) use 2 spaces, no tabs fix(indentation) use 2 spaces, add white-space
fcaballero
pushed a commit
to fcaballero/ui-select
that referenced
this issue
Apr 25, 2016
Use triple equals to determine if the selection matches one of the choices. Fixes angular-ui#1328
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I have a bunch of items as so:
My HTML:
I'm expecting when the select box loads up to see the
--None Selected--
item, since my model is set to the empty string,''
. However, due to this line using a double equals instead of a triple equals, theNo
item is actually displayed, since the formatter traverses from the end of the items array to the beginning, and when it finds the item with thefalse
value, it comparesfalse == ''
which returnstrue
.Is there any historical reason why this is a double equals instead of a triple equals? Would you accept a PR which changes this to triple equals?
The text was updated successfully, but these errors were encountered: