Skip to content

Commit 39e58e2

Browse files
committed
fix: pass down props
1 parent a4a7b99 commit 39e58e2

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

src/index.tsx

+4-2
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ const ClickAwayListener: FunctionComponent<Props> = ({
5454
onClickAway,
5555
focusEvent = 'focusin',
5656
mouseEvent = 'click',
57-
touchEvent = 'touchend'
57+
touchEvent = 'touchend',
58+
...rest
5859
}) => {
5960
const node = useRef<HTMLElement | null>(null);
6061
const bubbledEventTarget = useRef<EventTarget | null>(null);
@@ -135,7 +136,8 @@ const ClickAwayListener: FunctionComponent<Props> = ({
135136
ref: combinedRef,
136137
[mappedFocusEvent]: handleBubbledEvents(mappedFocusEvent),
137138
[mappedMouseEvent]: handleBubbledEvents(mappedMouseEvent),
138-
[mappedTouchEvent]: handleBubbledEvents(mappedTouchEvent)
139+
[mappedTouchEvent]: handleBubbledEvents(mappedTouchEvent),
140+
...rest
139141
})
140142
);
141143
};

0 commit comments

Comments
 (0)