Skip to content

Commit

Permalink
fix: fix tab display
Browse files Browse the repository at this point in the history
  • Loading branch information
taoyage committed Jul 3, 2022
1 parent b6fc9df commit 8dd9492
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions packages/tabs/tabs.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,18 +111,15 @@ const Tabs: React.FC<TabsProps> = React.memo((props) => {
))}
</div>

{panes.map(
(child) =>
activeKey === child.key && (
<div
key={child.key}
className={cx(`${classPrefix}-content`, props.tabContentClassName)}
style={{ display: activeKey === child.key ? 'block' : 'none' }}
>
{child}
</div>
)
)}
{panes.map((child) => (
<div
key={child.key}
className={cx(`${classPrefix}-content`, props.tabContentClassName)}
style={{ display: activeKey === child.key ? 'block' : 'none' }}
>
{child}
</div>
))}
</div>
);
});
Expand Down

0 comments on commit 8dd9492

Please sign in to comment.