mardi 23 février 2016

How can I prevent an action on a parent component from being called when I click on a child component?

I have the following bit of template in a project I'm working on:

<div class="item row" {{action "expandItem"}}>
  {{input type="checkbox" checked=isChecked}}
  {{item.name}}
</div>

The trouble I'm running into is that clicking the checkbox does not change its state. It does, however, fire the expandItem action. I'd like the behavior to be that clicking on the checkbox changes isChecked but clicking anywhere else in the div fires expandItem. How can I accomplish this?




Aucun commentaire:

Enregistrer un commentaire