mirror of
https://github.com/terribleplan/next.js.git
synced 2024-01-19 02:48:18 +00:00
669225263d
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 |
||
---|---|---|
.. | ||
router | ||
app.js | ||
asset.js | ||
constants.js | ||
dynamic.js | ||
error-debug.js | ||
error.js | ||
EventEmitter.js | ||
head.js | ||
link.js | ||
p-queue.js | ||
page-loader.js | ||
prefetch.js | ||
runtime-config.js | ||
shallow-equals.js | ||
side-effect.js | ||
utils.js |