Skip to content

Commit

Permalink
fix: fixes tab submitting form on click (#1233)
Browse files Browse the repository at this point in the history
  • Loading branch information
PeterKwesiAnsah committed Aug 1, 2023
1 parent 39da69c commit 7efd6c9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/components/tabs/src/tab.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ const Tab = forwardRef<"button", TabItemProps>((props, ref) => {
filterDOMProps(otherProps),
)}
className={slots.tab?.({class: tabStyles})}
type={Component === "button" ? "button" : undefined}
onClick={handleClick}
>
{isSelected && !disableAnimation && !disableCursorAnimation && isMounted ? (
Expand Down

1 comment on commit 7efd6c9

@vercel
Copy link

@vercel vercel bot commented on 7efd6c9 Aug 1, 2023

Choose a reason for hiding this comment

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

Please sign in to comment.