Skip to content

Commit

Permalink
add onChange callback
Browse files Browse the repository at this point in the history
  • Loading branch information
tbehailu committed Jan 22, 2024
1 parent d51d731 commit 421264d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/tabs/Tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ export function Tabs({
const [selectedIndex, setSelectedIndex] = useControlledState(
index,
defaultValue,
() => {}
onChange
);
return (
<div
Expand All @@ -168,7 +168,6 @@ export function Tabs({
onClick={e => {
e.preventDefault();
setSelectedIndex(index);
onChange && onChange(index);
}}
{...tab?.tabListItemProps}
>
Expand Down

0 comments on commit 421264d

Please sign in to comment.