Skip to content
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

Checkboxes with bindAttr checked don't update controller when clicked #467

Closed
pixelcort opened this issue Feb 1, 2012 · 2 comments
Closed

Comments

@pixelcort
Copy link

http://jsfiddle.net/pixelcort/PLPNQ/

According to emberjs.com, I should be able to do the following:

<input type="checkbox" {{bindAttr checked="isSelected"}}>

This works in terms of setting up the checked property, but when the checkbox is clicked the other side doesn't get updated.

I see there is an Ember.Checkbox. Should I be using that instead? If so, the emberjs.com website should not show the example above.

@wagenet
Copy link
Member

wagenet commented Feb 1, 2012

There are two problems here. 1) bindAttr is one directional. 2) the checked property is not updated on dom when the checkbox is checked, it just specifies the original state.

Solution: use Ember.Checkbox.

@wagenet wagenet closed this as completed Feb 1, 2012
@pixelcort
Copy link
Author

emberjs/website#46 clarifies in documentation.

sandstrom pushed a commit to sandstrom/ember.js that referenced this issue Jun 17, 2021
…rn/ember-cli-babel-7.13.0

Bump ember-cli-babel from 7.11.0 to 7.13.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants