Skip to content

Commit f055fbd

Browse files
Merge pull request #2019 from inertiajs/fix-onClick-react
[2.x] Fix `onClick` in React adapter
2 parents 3701734 + 8b2a367 commit f055fbd

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

packages/react/src/Link.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,8 @@ const Link = forwardRef<unknown, InertiaLinkProps>(
166166

167167
const regularEvents = {
168168
onClick: (event) => {
169+
onClick(event)
170+
169171
if (shouldIntercept(event)) {
170172
event.preventDefault()
171173

0 commit comments

Comments
 (0)