We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 752f2cb commit 380da26Copy full SHA for 380da26
components/tabs/Tabs.jsx
@@ -27,6 +27,10 @@ class Tabs extends React.Component {
27
this.updatePointer(nextProps.index);
28
}
29
30
+ componentWillUnmount () {
31
+ clearTimeout(this.pointerTimeout);
32
+ }
33
+
34
handleHeaderClick = (idx) => {
35
if (this.props.onChange) this.props.onChange(idx);
36
};
@@ -50,7 +54,8 @@ class Tabs extends React.Component {
50
54
51
55
52
56
updatePointer (idx) {
53
- setTimeout(() => {
57
58
+ this.pointerTimeout = setTimeout(() => {
59
const startPoint = this.refs.tabs.getBoundingClientRect().left;
60
const label = this.refs.navigation.children[idx].getBoundingClientRect();
61
this.setState({
0 commit comments