mirror of
https://github.com/nextui-org/nextui.git
synced 2025-12-08 19:26:11 +00:00
fix(tabs): onClick (#5378)
* fix(tabs): handleClick * chore(changeset): add changeset
This commit is contained in:
parent
7dff993e1d
commit
dd63b83b6b
5
.changeset/olive-hairs-listen.md
Normal file
5
.changeset/olive-hairs-listen.md
Normal file
@ -0,0 +1,5 @@
|
||||
---
|
||||
"@heroui/tabs": patch
|
||||
---
|
||||
|
||||
fix tabs handleClick (#5357)
|
||||
@ -79,8 +79,6 @@ const Tab = forwardRef<"button", TabItemProps>((props, ref) => {
|
||||
});
|
||||
|
||||
const handleClick = () => {
|
||||
chain(onClick, tabProps.onClick)();
|
||||
|
||||
if (!domRef?.current || !listRef?.current) return;
|
||||
|
||||
scrollIntoView(domRef.current, {
|
||||
@ -115,7 +113,7 @@ const Tab = forwardRef<"button", TabItemProps>((props, ref) => {
|
||||
enabled: shouldFilterDOMProps,
|
||||
omitPropNames: new Set(["title"]),
|
||||
}),
|
||||
{onClick: handleClick},
|
||||
{onClick: chain(handleClick, onClick, tabProps.onClick)},
|
||||
)}
|
||||
className={slots.tab?.({class: tabStyles})}
|
||||
title={otherProps?.titleValue}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user