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
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
..
components Don’t use chunkhash in development (#4436) 2018-05-23 14:37:02 +02:00
lib Fix page loader page normalization issue (#1844) 2017-05-01 16:26:18 -07:00
pages Allow onClick on next/link component's child (#4474) 2018-05-27 20:47:02 +02:00
test Allow onClick on next/link component's child (#4474) 2018-05-27 20:47:02 +02:00
next.config.js Implement "on demand entries" (#1111) 2017-02-26 11:45:16 -08:00