Skip to content

feature: UISref should not clobber anchor tag's onClick handler #240

@christopherthielen

Description

@christopherthielen

If you write a UISref like this:

<UISref to="state">
  <a onClick={() => analytics('clicked!')>click me</a>
</UISref>

the UISref should call the anchor tag's onClick before executing its own logic.

Additionally, you should be able to halt a UISref by calling event.preventDefault() like this:

<UISref to="state">
  <a onClick={e => e.preventDefault())>nope, sorry</a>
</UISref>

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