Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nz-spin delay should only work in one direction #5926

Closed
Airblader opened this issue Oct 15, 2020 · 0 comments · Fixed by #5930
Closed

nz-spin delay should only work in one direction #5926

Airblader opened this issue Oct 15, 2020 · 0 comments · Fixed by #5930
Assignees

Comments

@Airblader
Copy link
Collaborator

Reproduction link

https://stackblitz.com/edit/angular-f1slud?file=src/app/app.component.ts

Steps to reproduce

  1. Enable the loading state and wait a few seconds. The alert is now showing a spinner.
  2. Disable loading and after 500ms enable it again

What is expected?

The spinning should immediately stop and restart after the debounce.

What is actually happening?

Nothing

Environment Info
ng-zorro-antd 10.0.1
Browser Chrome

The delay setting is useful in order to not show a loading spinner if the data becomes available quickly enough. However, delaying the end of the spinner makes little sense.

Airblader added a commit to Airblader/ng-zorro-antd that referenced this issue Oct 15, 2020
This also cleans up the rxjs in this component which would actually create
a memory leak over time if the delay input changes a lot (which is very
hypothetical).

fixes NG-ZORRO#5926
Airblader added a commit to Airblader/ng-zorro-antd that referenced this issue Oct 15, 2020
This also cleans up the rxjs in this component which would actually create
a memory leak over time if the delay input changes a lot (which is very
hypothetical).

fixes NG-ZORRO#5926
vthinkxie pushed a commit that referenced this issue Oct 16, 2020
* docs: remove useless CSS

* fix(module:spin): use delay only to activate spinner

This also cleans up the rxjs in this component which would actually create
a memory leak over time if the delay input changes a lot (which is very
hypothetical).

fixes #5926

* fix(module:spin): respect delay on init

fixes #5928
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants