Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dropdown.Item - MouseEvent<HTMLElement> is not passed through onclick #1402

Open
rlongre opened this issue May 24, 2024 · 0 comments
Open

Dropdown.Item - MouseEvent<HTMLElement> is not passed through onclick #1402

rlongre opened this issue May 24, 2024 · 0 comments

Comments

@rlongre
Copy link

rlongre commented May 24, 2024

Because the MouseEvent is not passed through dropdown items, scenarios such as stopping propagation when the dropdown is descendant of another clickable item cannot be supported.

onClick: () => {
onClick?.();
dismissOnClick && handleSelect(null);
},

By contrast, NavbarLink passes the event through:

const handleClick = (event: MouseEvent<HTMLAnchorElement>) => {
setIsOpen(false);
onClick?.(event);
};

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant