mardi 26 avril 2016

Ember action preventing checkbox value from setting

In my ember application I would like to render a set of checkboxes dynamically via a loop and disable any unselected checkboxes if 2 of the checkboxes have been checked.

I am having problems with setting a value to 'true' when a checkbox is selected that has a change action. For the following example checkbox.value does not get set when the checkbox is selected.

 

However when I remove the action it does get set:

 

Full example on JSFiddle

How can I set the value while still running the action? Or is the a better way to disable the unchecked checkbox when 2 have already been selected?




Aucun commentaire:

Enregistrer un commentaire