-
Notifications
You must be signed in to change notification settings - Fork 2
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
#32 - Update either-or
#46
Conversation
can-stache-converters.js
Outdated
get: function(chosen, a, b){ | ||
return b !== chosen(); | ||
get: function(chosen, a){ | ||
return a === chosen(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's important to change this, now. Without this change, the case where chosen()
doesn't match a
or b
results in a checked checkbox without the chosen value being updated to a
or b
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd suggest we even take it a step further and set chosen(b)
if chosen() !== a
.
3b88018
to
728ce9c
Compare
either-or
and make false the default state…either-or
2b525cb
to
14cc828
Compare
QUnit.equal(map.pref, "Yes", "map updated because check was checked"); | ||
}); | ||
|
||
QUnit.test("supports computes", function() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@justinbmeyer I added this test using computes. Does this answer your question?
14cc828
to
efb1c34
Compare
undefined
and dev.warn in console if neithera
orb
match~chosen
Resolves #32