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
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
..
integration Allow onClick on next/link component's child (#4474) 2018-05-27 20:47:02 +02:00
isolated Add flow, pages-manifest.json, defaultPathMap for export (minor) (#4066) 2018-03-30 15:08:09 +02:00
lib Add build manifest (#4119) 2018-04-12 09:47:42 +02:00
node_modules Handle empty assetPrefix scenario properly. (#3667) 2018-02-03 17:12:01 +01:00
unit Use deterministic names for dynamic import (#2788) 2017-08-16 22:44:00 +05:30
.babelrc Speed up tests (#4102) 2018-04-03 14:43:56 +02:00
.gitignore Universal Webpack (#3578) 2018-01-30 16:44:44 +01:00