diff --git a/src/useClickAway.ts b/src/useClickAway.ts index 7e28b7bd5e..0a6ec7cb00 100644 --- a/src/useClickAway.ts +++ b/src/useClickAway.ts @@ -5,7 +5,7 @@ const useClickAway = (ref: RefObject, onClickAway: () => voi useEffect(() => { const handler = (event) => { const {current: el} = ref; - el && !el.contains(event.target) && onClickAway(); + el && !el.contains(event.target) && onClickAway(event); }; on(document, 'click', handler); return () => {