diff --git a/CHANGELOG.md b/CHANGELOG.md index f7442db2e..74dd628e7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,7 +9,7 @@ For changes prior to v1.0.0, see the [legacy releases](https://legacy.inertiajs. ## [Unreleased](https://github.com/inertiajs/inertia/compare/v1.0.11...HEAD) -- Nothing! +- Fix type of `onClick` for `Link` component in React and Vue ([#1699](https://github.com/inertiajs/inertia/pull/1699), [#1701](https://github.com/inertiajs/inertia/pull/1701)) ## [v1.0.11](https://github.com/inertiajs/inertia/compare/v1.0.10...v1.0.11) diff --git a/packages/vue2/src/link.ts b/packages/vue2/src/link.ts index 1eb256880..53b34a526 100755 --- a/packages/vue2/src/link.ts +++ b/packages/vue2/src/link.ts @@ -15,7 +15,7 @@ export interface InertiaLinkProps { href: string method?: Method headers?: Record - onClick?: (event: MouseEvent | KeyboardEvent) => void + onClick?: (event: MouseEvent) => void preserveScroll?: PreserveStateOption preserveState?: PreserveStateOption replace?: boolean diff --git a/packages/vue3/src/link.ts b/packages/vue3/src/link.ts index 78bb3ecf4..9bc3949db 100755 --- a/packages/vue3/src/link.ts +++ b/packages/vue3/src/link.ts @@ -7,7 +7,7 @@ export interface InertiaLinkProps { href: string method?: Method headers?: object - onClick?: (event: MouseEvent | KeyboardEvent) => void + onClick?: (event: MouseEvent) => void preserveScroll?: boolean | ((props: PageProps) => boolean) preserveState?: boolean | ((props: PageProps) => boolean) | null replace?: boolean