1.0.1 • Published 8 years ago
ember-ignore-children-helper v1.0.1
ignore-children
No actual children were neglected in the making of this addon.
This Ember addon provides a single helper named ignore-children. It lets you declare an event handler that will only fire for events that directly target the given element. Events from its children will be ignored.
For example, assume that your-component accepts an action named doSomething:
{{your-component doSomething=(action "alrightyThen")}}Then within your-component.hbs, you can say:
<div class="outer" onclick={{action (ignore-children doSomething) }}>
Clicks in this area will cause "doSomething" to be called.
<div class="inner">But clicks in this area will not! ignore-children is blocking them for us.</div>
</div>See tests/dummy/app/index.hbs for a working example you can play with.
Installation
ember install ember-ignore-children-helper
Running, Testing, etc
Standard ember addon conventions apply. In this repo, ember s will run the included dummy app and ember test will run the test suite.