Skip to content

Commit

Permalink
fix: when using menu in a form, the form is submitted when clicking o…
Browse files Browse the repository at this point in the history
…n a menu item if closeOnClcik is set to false (#3660)
  • Loading branch information
FredrikMWold authored Oct 23, 2024
1 parent 5058acf commit 35f89ea
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/eds-core-react/src/components/Menu/MenuItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ export const MenuItem: OverridableSubComponent = forwardRef<
<Item
{...props}
$active={active}
type="button"
ref={mergeRefs<HTMLButtonElement>(ref, (el) => {
if (isFocused) {
requestAnimationFrame(() => {
Expand Down

0 comments on commit 35f89ea

Please sign in to comment.