Comparing version 9.0.1 to 9.0.2
@@ -35,7 +35,5 @@ import _defineProperty from 'babel-runtime/helpers/defineProperty'; | ||
this.setState({}, this.scrollToActiveTab); | ||
} else { | ||
} else if (!prevProps || props.activeKey !== prevProps.activeKey) { | ||
// can not use props.activeKey | ||
if (!prevProps || props.activeKey !== prevProps.activeKey) { | ||
this.scrollToActiveTab(); | ||
} | ||
this.scrollToActiveTab(); | ||
} | ||
@@ -156,3 +154,6 @@ }, | ||
}, | ||
scrollToActiveTab: function scrollToActiveTab() { | ||
scrollToActiveTab: function scrollToActiveTab(e) { | ||
if (e && e.target !== e.currentTarget) { | ||
return; | ||
} | ||
var _refs = this.refs, | ||
@@ -234,3 +235,4 @@ activeTab = _refs.activeTab, | ||
key: 'container', | ||
ref: 'container' | ||
ref: 'container', | ||
onTransitionEnd: this.scrollToActiveTab | ||
}, | ||
@@ -237,0 +239,0 @@ prevButton, |
@@ -52,7 +52,5 @@ 'use strict'; | ||
this.setState({}, this.scrollToActiveTab); | ||
} else { | ||
} else if (!prevProps || props.activeKey !== prevProps.activeKey) { | ||
// can not use props.activeKey | ||
if (!prevProps || props.activeKey !== prevProps.activeKey) { | ||
this.scrollToActiveTab(); | ||
} | ||
this.scrollToActiveTab(); | ||
} | ||
@@ -173,3 +171,6 @@ }, | ||
}, | ||
scrollToActiveTab: function scrollToActiveTab() { | ||
scrollToActiveTab: function scrollToActiveTab(e) { | ||
if (e && e.target !== e.currentTarget) { | ||
return; | ||
} | ||
var _refs = this.refs, | ||
@@ -251,3 +252,4 @@ activeTab = _refs.activeTab, | ||
key: 'container', | ||
ref: 'container' | ||
ref: 'container', | ||
onTransitionEnd: this.scrollToActiveTab | ||
}, | ||
@@ -254,0 +256,0 @@ prevButton, |
{ | ||
"name": "rc-tabs", | ||
"version": "9.0.1", | ||
"version": "9.0.2", | ||
"description": "tabs ui component for react", | ||
@@ -13,3 +13,3 @@ "keywords": [ | ||
"es", | ||
"assets/*.css" | ||
"assets/index.css" | ||
], | ||
@@ -16,0 +16,0 @@ "main": "./lib/index", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
122418
3272