Skip to content

Commit

Permalink
fix: Not show -000%
Browse files Browse the repository at this point in the history
  • Loading branch information
zombieJ committed Jun 9, 2020
1 parent 45f2c8d commit 6066c66
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
2 changes: 1 addition & 1 deletion src/TabPanelList/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ export default function TabPanelList({
className={classNames(`${prefixCls}-content`, `${prefixCls}-content-${tabPosition}`, {
[`${prefixCls}-content-animated`]: tabPaneAnimated,
})}
style={{ [rtl ? 'marginRight' : 'marginLeft']: `-${activeIndex}00%` }}
style={activeIndex ? { [rtl ? 'marginRight' : 'marginLeft']: `-${activeIndex}00%` } : null}
>
{tabs.map(tab => {
return React.cloneElement(tab.node, {
Expand Down
1 change: 0 additions & 1 deletion tests/__snapshots__/index.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ exports[`Tabs.Basic Skip invalidate children 1`] = `
>
<div
class="rc-tabs-content rc-tabs-content-top"
style="margin-left: -000%;"
>
<div
aria-hidden="false"
Expand Down

0 comments on commit 6066c66

Please sign in to comment.