Skip to content

Commit 4473f8d

Browse files
committed
fix: TabGroup: onClick preventDefault when tab is in active state
1 parent e0f0dca commit 4473f8d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Shared/Components/TabGroup/TabGroup.component.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,10 +34,10 @@ const Tab = ({
3434
React.MouseEvent<HTMLAnchorElement, MouseEvent> &
3535
React.MouseEvent<HTMLDivElement, MouseEvent>,
3636
) => {
37-
props?.onClick(e)
3837
if (active || e.currentTarget.classList.contains('active')) {
3938
e.preventDefault()
4039
}
40+
props?.onClick(e)
4141
}
4242

4343
const getTabComponent = () => {

0 commit comments

Comments
 (0)