Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
christopherthielen opened this issue Aug 9, 2018 · 0 comments
Closed

Comments

@christopherthielen
Copy link
Member

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>
@christopherthielen christopherthielen changed the title UISref should not clobber anchor tag's onClick handler feature: UISref should not clobber anchor tag's onClick handler Aug 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant