1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00
next.js/test/integration/basic/pages/nav
Michał Miszczyszyn 669225263d Allow onClick on next/link component's child (#4474)
Allow `onClick` on `next/link` child. This should not be a breaking change, but it's a very useful feature. Real-life use cases include: analytics or closing menu on navigation, and other.

- [x] allow optional `onClick` on `next/link` component's child
- [x] call original `child.props.onClick(e)` before `this.linkClicked(e)`
- [x] add integration tests
- [x] cancel the navigation if `e.defaultPrevented === true`

Fixes #1490
2018-05-27 20:47:02 +02:00
..
about.js Make sure lastAppProps always have some value. (#829) 2017-01-20 11:33:46 -08:00
as-path-using-router.js Introduce "asPath" into router and getInitialProps (#1857) 2017-05-03 09:40:09 -07:00
as-path.js Introduce "asPath" into router and getInitialProps (#1857) 2017-05-03 09:40:09 -07:00
hash-changes.js Treat navigation to empty hash as hash navigate (#2971) 2017-09-27 21:55:49 +02:00
index.js Allow onClick on next/link component's child (#4474) 2018-05-27 20:47:02 +02:00
on-click.js Allow onClick on next/link component's child (#4474) 2018-05-27 20:47:02 +02:00
pass-href-prop.js fix: Forces Link to expose the href to the child using passHref property. (#2503) 2017-07-09 10:39:02 +05:30
querystring.js Add support for URL objects in Link and Router (#1345) 2017-03-12 09:27:51 +05:30
redirect.js Add test cases for getInitialProps based redirect logic. (#1578) 2017-03-31 11:35:45 -03:00
self-reload.js Reload the page if asked to change the current URL (#1159) 2017-02-15 19:27:41 +01:00
shallow-routing.js Introducing Shallow Routing (#1357) 2017-03-06 08:48:35 -08:00
url-prop-change.js Make sure props.url is immutable (#4352) 2018-05-12 20:10:17 +02:00
with-hoc.js Add asPath on the server (#3149) 2017-10-22 12:00:31 -07:00