-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Closed
Labels
[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended
Description
Describe the bug
The buttons in the tab panel component trigger form submission.
To Reproduce
Steps to reproduce the behavior:
- Include a TabPanel within a
<form>
element with anonSubmit
handler. - Click on one of the tab panel buttons.
- The form's
onSubmit
handler is triggered.
Expected behavior
The tab to change but the form not to be submitted.
Possible Solutions
preventDefault
on the click event.- Add a
type="button"
to theTabButton
component. - Allow passing additional props to the
TabButton
via thetabs
prop.
Desktop (please complete the following information):
- OS: macOS
- Browser Safari, Chrome, etc...
- Version 12
Metadata
Metadata
Assignees
Labels
[Type] BugAn existing feature does not function as intendedAn existing feature does not function as intended