Skip to content

Commit

Permalink
refactor: remove onClick key params
Browse files Browse the repository at this point in the history
  • Loading branch information
Layouwen committed Aug 7, 2024
1 parent 9f4fed3 commit 480a027
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/tab-bar/tab-bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export type TabBarItemProps = {
icon?: ReactNode | ((active: boolean) => ReactNode)
title?: ReactNode | ((active: boolean) => ReactNode)
badge?: BadgeProps['content']
onClick?: (key: string) => void
onClick?: () => void
} & NativeProps

/* istanbul ignore next */
Expand Down Expand Up @@ -122,7 +122,7 @@ export const TabBar: FC<TabBarProps> = p => {
if (key === undefined || key === null) return

setActiveKey(key.toString())
item.props.onClick?.(key as string)
item.props.onClick?.()
}}
className={classNames(`${classPrefix}-item`, {
[`${classPrefix}-item-active`]: active,
Expand Down

0 comments on commit 480a027

Please sign in to comment.