Skip to content

Commit

Permalink
fix: e.target is not the triggerElementRef in v17
Browse files Browse the repository at this point in the history
  • Loading branch information
koba04 committed Oct 8, 2020
1 parent 5e1d40e commit f4638f1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/Dropdown/Dropdown.tsx
Expand Up @@ -51,7 +51,7 @@ export const Dropdown: FC<Props> = ({ children }) => {
const onClickBody = (e: any) => {
// ignore events from events within DropdownTrigger and DropdownContent
if (
e.target === triggerElementRef.current ||
hasParentElement(e.target, triggerElementRef.current) ||
hasParentElement(e.target, portalElementRef.current)
) {
return
Expand Down

0 comments on commit f4638f1

Please sign in to comment.