mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-30 19:19:26 +08:00
fix spin timer, close #6383
This commit is contained in:
parent
41f157e596
commit
b991137628
@ -78,6 +78,9 @@ export default class Spin extends React.Component<SpinProps, any> {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (spinning && delay && !isNaN(Number(delay))) {
|
if (spinning && delay && !isNaN(Number(delay))) {
|
||||||
|
if (this.delayTimeout) {
|
||||||
|
clearTimeout(this.delayTimeout);
|
||||||
|
}
|
||||||
this.delayTimeout = setTimeout(() => this.setState({ spinning }), delay);
|
this.delayTimeout = setTimeout(() => this.setState({ spinning }), delay);
|
||||||
} else {
|
} else {
|
||||||
this.setState({ spinning });
|
this.setState({ spinning });
|
||||||
|
Loading…
Reference in New Issue
Block a user