# Sub-component action not bubbling up

**URL:** <https://discuss.emberjs.com/t/sub-component-action-not-bubbling-up/6739>\
**Category:** Uncategorized\
**Created:** [November 18, 2014, 5:32pm UTC](https://discuss.emberjs.com/t/sub-component-action-not-bubbling-up/6739 "2014-11-18T17:32:28Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![plexus](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/plexus/32/9969_2.png) [@plexus](https://discuss.emberjs.com/u/plexus)\
**Post date:** [December 12, 2014, 10:50am UTC](https://discuss.emberjs.com/t/sub-component-action-not-bubbling-up/6739/6 "2014-12-12T10:50:21Z")

</div>

I’ve spent half a day digging into this, and eventually found that you can have all actions bubble by aliasing `target` to `targetObject` in the outer component.

```nohighlight
App.OuterComponent = Em.Component.extend
  target: Em.computed.alias("targetObject")

```

I can’t decide though if this is a clean way to opt-in to event bubbling, or if it comes too close to implementation details, i.e. might easily break with future updates. Thoughts?

* * *

(details of why this works)

A Component’s `sendAction` is a wrapper around [TargetActionSupport](http://emberjs.com/api/classes/Ember.TargetActionSupport.html)’s `triggerAction`. This does

```auto
this.get("targetObject").send(actionName)`

```

When `send` (implemented in [ActionHandler](http://emberjs.com/api/classes/Ember.ActionHandler.html)) gets the action, it will look in the `actions` hash, or bubble by doing

```auto
this.get("target").send(actionName)`

```

The result: only objects with a `target` will forward the event. Component’s don’t have a target, so they can’t let the event bubble up. Either they handle it, or it’s gone.

---

_[View the full topic](https://discuss.emberjs.com/t/sub-component-action-not-bubbling-up/6739)._
