1
0
Fork 0
mirror of https://github.com/terribleplan/next.js.git synced 2024-01-19 02:48:18 +00:00
next.js/lib
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
..
router added "hashChangeStart" and "hashChangeComplete" events (#4234) 2018-05-25 14:47:58 +02:00
app.js Make sure props.url is immutable (#4352) 2018-05-12 20:10:17 +02:00
asset.js Handle empty assetPrefix scenario properly. (#3667) 2018-02-03 17:12:01 +01:00
constants.js Add build manifest (#4119) 2018-04-12 09:47:42 +02:00
dynamic.js Set this.mounted to false when dynamic component is unmounted (#4333) 2018-05-11 17:07:06 +02:00
error-debug.js Improved stacktraces (minor) (#4156) 2018-04-18 21:48:06 +05:30
error.js Add title to default error page (#4383) 2018-05-25 13:35:59 +02:00
EventEmitter.js Upgrade standard.js (#4064) 2018-03-27 20:11:03 +02:00
head.js Upgrade standard.js (#4064) 2018-03-27 20:11:03 +02:00
link.js Allow onClick on next/link component's child (#4474) 2018-05-27 20:47:02 +02:00
p-queue.js improve prefetch (#1161) 2017-02-16 00:59:42 +05:30
page-loader.js Remove special error script handling (#3849) 2018-02-21 23:11:25 +05:30
prefetch.js fix prefetch url (#1154) 2017-02-15 15:01:03 +01:00
runtime-config.js Exposing configuration to the server / client side (minor) (#3882) 2018-02-26 12:03:27 +01:00
shallow-equals.js Added linting using standard (#27) 2016-10-16 17:00:17 -07:00
side-effect.js Create displayName util (#2286) 2017-06-19 18:33:02 +05:30
utils.js Check if headers are sent (#3642) 2018-01-31 18:42:21 +05:30