Skip to content

Commit

Permalink
fix: typing error
Browse files Browse the repository at this point in the history
  • Loading branch information
wewoor committed Nov 24, 2020
1 parent 8691459 commit 8891b52
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/components/tabs/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,14 @@ export interface ITab {
mode?: string;
data?: [];
value?: string;
renderPane?: string | React.ReactNode;
renderPane?: () => React.ReactNode;
}
interface ITabsProps {
data: ITab[];
closeTab?: (index: number) => void;
changeTab?: (tabs: ITab[]) => void;
selectTab: (index: number) => void;
children: React.ReactNode | JSX.Element;
selectTab?: (index: number) => void;
children?: React.ReactNode;
}

const DraggleTabs: React.FC<ITabsProps> = (props: ITabsProps) => {
Expand All @@ -47,7 +47,7 @@ const DraggleTabs: React.FC<ITabsProps> = (props: ITabsProps) => {

const onTabClick = (key) => {
console.log(`onTabClick ${key}`);
selectTab(key);
if (selectTab) selectTab(key);
};

const renderTabBar = (props, DefaultTabBar) => {
Expand Down

0 comments on commit 8891b52

Please sign in to comment.