diff --git a/src/useClickAway.ts b/src/useClickAway.ts index dbe3860ff6..12794b9bf8 100644 --- a/src/useClickAway.ts +++ b/src/useClickAway.ts @@ -3,9 +3,9 @@ import { off, on } from './util'; const defaultEvents = ['mousedown', 'touchstart']; -const useClickAway = ( +const useClickAway = ( ref: RefObject, - onClickAway: (event: T | Event) => void, + onClickAway: (event: E) => void, events: string[] = defaultEvents ) => { const savedCallback = useRef(onClickAway);