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

fix: when using menu in a form, the form is submitted #3660

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

FredrikMWold
Copy link
Contributor

When using Menu in a form, the form is submitted when clicking on a menu item if closeMenuOnClcik is set to false

The problem is a missing type="button".
Looks like this bug has been hiding behind the fact that having it in a form and having closeMenuOnClick set to false is rare.
The onClick callback being called twice when you set closeMenuOnClick set to false and dont give a onClose callback seems to have some have resolved for that instance

…n a menu item if closeOnClcik is set to false
Copy link
Collaborator

@oddvernes oddvernes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch!

@oddvernes oddvernes merged commit 35f89ea into equinor:develop Oct 23, 2024
4 of 6 checks passed
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

Successfully merging this pull request may close these issues.

2 participants