Skip to content
This repository was archived by the owner on Mar 22, 2019. It is now read-only.
This repository was archived by the owner on Mar 22, 2019. It is now read-only.

Add documentation on how to support multiple actions on a single element #2900

Open

Description

@myartsev

I've spent more time than I'm willing to admit in figuring this out, and now it seems so simple:
<a {{action 'foo' on="click"}} {{action 'bar' on="mouseEnter"}} {{action 'baz' on="mouseLeave"}}>...</a>

Can we add some documentation on how to support multiple actions on a single element?
I think the reason this turned out to be such an unnecessary hassle is the amount of outdated information out there on the web today.

I'm thinking this is the best place for it is before the blurb on attaching actions to non-clickable events?
Happy to write it up and send a PR if you guys think it's useful. I imagine I'm not the first or the last person to run into this!

Activity

  1. locks commented on Aug 7, 2017

    @locks
    Contributor

    I think at that point you'd be better off using actions as event handlers, <a onclick={{action 'foo'}} > and such. Can you submit a PR and we'll discuss there?

  2. acorncom commented on Sep 14, 2017

    @acorncom
    Contributor

    @myartsev any thoughts here? Would love to get this added into the guides if you have time for that PR ...

  3. myartsev commented on Sep 15, 2017

    @myartsev
    Author

    My bad, this dropped off my radar.

    @locks; can those event handlers be used to handle all types of events? Mouse up, down, etc
    If that's the case, why isn't that the suggested way of handling events in the guides?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions