mirror of
https://github.com/ant-design/ant-design.git
synced 2025-08-06 16:06:28 +08:00
Merge branch '1.x-stable' of github.com:ant-design/ant-design into 1.x-stable
This commit is contained in:
commit
47d273669d
@ -52,12 +52,13 @@ export default class Spin extends React.Component {
|
||||
}
|
||||
|
||||
componentWillReceiveProps(nextProps) {
|
||||
const currentSpinning = this.getSpinning(this.props);
|
||||
const spinning = this.getSpinning(nextProps);
|
||||
if (this.debounceTimeout) {
|
||||
clearTimeout(this.debounceTimeout);
|
||||
}
|
||||
if (spinning) {
|
||||
this.debounceTimeout = setTimeout(() => this.setState({ spinning }), 250);
|
||||
if (currentSpinning && !spinning) {
|
||||
this.debounceTimeout = setTimeout(() => this.setState({ spinning }), 500);
|
||||
} else {
|
||||
this.setState({ spinning });
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user