Browse Source

card tabs animation could be overrided, close #6070

pull/1427/merge
afc163 8 years ago
parent
commit
de87bd7d17
  1. 6
      components/tabs/index.tsx

6
components/tabs/index.tsx

@ -47,7 +47,6 @@ export default class Tabs extends React.Component<TabsProps, any> {
static defaultProps = {
prefixCls: 'ant-tabs',
hideAdd: false,
animated: true,
};
createNewTab = (targetKey) => {
@ -98,7 +97,7 @@ export default class Tabs extends React.Component<TabsProps, any> {
onTabClick,
onPrevClick,
onNextClick,
animated,
animated = true,
} = this.props;
let { inkBarAnimated, tabPaneAnimated } = typeof animated === 'object' ? {
@ -107,8 +106,9 @@ export default class Tabs extends React.Component<TabsProps, any> {
inkBarAnimated: animated, tabPaneAnimated: animated,
};
// card tabs should not have animation
if (type !== 'line') {
tabPaneAnimated = false;
tabPaneAnimated = 'animated' in this.props ? tabPaneAnimated : false;
}
warning(

Loading…
Cancel
Save