mirror of
https://gitee.com/ant-design/ant-design.git
synced 2024-11-30 11:08:45 +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 {
|
||||
if (spinning && delay && !isNaN(Number(delay))) {
|
||||
if (this.delayTimeout) {
|
||||
clearTimeout(this.delayTimeout);
|
||||
}
|
||||
this.delayTimeout = setTimeout(() => this.setState({ spinning }), delay);
|
||||
} else {
|
||||
this.setState({ spinning });
|
||||
|
Loading…
Reference in New Issue
Block a user