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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: If there is an existing debounce in progress, cancel that #16081

Merged
merged 1 commit into from Apr 15, 2019

Conversation

Projects
None yet
2 participants
@raybooysen
Copy link

commented Apr 15, 2019

馃 This is a ...

  • New feature
  • Bug fix
  • Site / document update
  • Component style update
  • TypeScript definition update
  • Refactoring
  • Code style optimization
  • Branch merge
  • Other (about what?)

馃懟 What's the background?

When you have a Spin component and componentDidUpdate is called, any existing debounce() call is not cancelled.

馃挕 Solution

On every time we debounce, check and cancel if appropriate.

馃摑 Changelog

  • English Changelog: Spin component cancels debounce calls between update calls
  • Chinese Changelog (optional):

鈽戯笍 Self Check before Merge

  • Doc is updated/provided or not needed
  • Demo is updated/provided or not needed
  • TypeScript definition is updated/provided or not needed
  • Changelog is provided or not needed

@pr-triage pr-triage bot added the PR: unreviewed label Apr 15, 2019

@@ -116,6 +120,7 @@ class Spin extends React.Component<SpinProps, SpinState> {
debouncifyUpdateSpinning = (props?: SpinProps) => {
const { delay } = props || this.props;
if (delay) {
this.cancelExistingSpin();

This comment has been minimized.

Copy link
@raybooysen

raybooysen Apr 15, 2019

Author

Unsure if this should be outside the if and cancelled in all cases. Can someone advise?

@raybooysen

This comment has been minimized.

Copy link
Author

commented Apr 15, 2019

Fixes #15623

@netlify

This comment has been minimized.

Copy link

commented Apr 15, 2019

Deploy preview for ant-design ready!

Built with commit fe1617b

https://deploy-preview-16081--ant-design.netlify.com

An enterprise-class UI design language and React-based implementation with a set of high-quality React components, one of best React UI library for enterprises
@codecov

This comment has been minimized.

Copy link

commented Apr 15, 2019

Codecov Report

Merging #16081 into master will increase coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16081      +/-   ##
==========================================
+ Coverage   95.13%   95.18%   +0.04%     
==========================================
  Files         251      251              
  Lines        6722     6725       +3     
  Branches     1957     1957              
==========================================
+ Hits         6395     6401       +6     
+ Misses        326      323       -3     
  Partials        1        1
Impacted Files Coverage 螖
components/spin/index.tsx 95% <100%> (+0.26%) 猬嗭笍
components/_util/wave.tsx 88.46% <0%> (+2.88%) 猬嗭笍

Continue to review full report at Codecov.

Legend - Click here to learn more
螖 = absolute <relative> (impact), 酶 = not affected, ? = missing data
Powered by Codecov. Last update d9d189e...fe1617b. Read the comment docs.

1 similar comment
@codecov

This comment has been minimized.

Copy link

commented Apr 15, 2019

Codecov Report

Merging #16081 into master will increase coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #16081      +/-   ##
==========================================
+ Coverage   95.13%   95.18%   +0.04%     
==========================================
  Files         251      251              
  Lines        6722     6725       +3     
  Branches     1957     1957              
==========================================
+ Hits         6395     6401       +6     
+ Misses        326      323       -3     
  Partials        1        1
Impacted Files Coverage 螖
components/spin/index.tsx 95% <100%> (+0.26%) 猬嗭笍
components/_util/wave.tsx 88.46% <0%> (+2.88%) 猬嗭笍

Continue to review full report at Codecov.

Legend - Click here to learn more
螖 = absolute <relative> (impact), 酶 = not affected, ? = missing data
Powered by Codecov. Last update d9d189e...fe1617b. Read the comment docs.

@afc163 afc163 changed the title If there is an existing debounce in progress, cancel that fix: If there is an existing debounce in progress, cancel that Apr 15, 2019

@afc163 afc163 merged commit 321a12e into ant-design:master Apr 15, 2019

27 of 29 checks passed

Header rules No header rules processed
Details
Pages changed 212 new files uploaded
Details
CodeFactor No issues found.
Details
DEP All dependencies are resolved
LGTM analysis: JavaScript No new or fixed alerts
Details
Mixed content No mixed content detected
Details
Redirect rules 18 redirect rules processed
Details
Semantic Pull Request ready to be squashed
Details
WIP Ready for review
Details
ant-design.ant-design #ant design succeeded
Details
ci/circleci: compile Your tests passed on CircleCI!
Details
ci/circleci: dist Your tests passed on CircleCI!
Details
ci/circleci: lint Your tests passed on CircleCI!
Details
ci/circleci: setup Your tests passed on CircleCI!
Details
ci/circleci: test_dist Your tests passed on CircleCI!
Details
ci/circleci: test_dist_15 Your tests passed on CircleCI!
Details
ci/circleci: test_dom Your tests passed on CircleCI!
Details
ci/circleci: test_dom_15 Your tests passed on CircleCI!
Details
ci/circleci: test_es Your tests passed on CircleCI!
Details
ci/circleci: test_es_15 Your tests passed on CircleCI!
Details
ci/circleci: test_lib Your tests passed on CircleCI!
Details
ci/circleci: test_lib_15 Your tests passed on CircleCI!
Details
ci/circleci: test_node Your tests passed on CircleCI!
Details
ci/circleci: test_node_15 Your tests passed on CircleCI!
Details
codebeat no reportable quality changes
Details
codecov/patch 100% of diff hit (target 95.13%)
Details
codecov/project 95.18% (+0.04%) compared to d9d189e
Details
deploy/netlify Deploy preview ready!
Details
security/snyk - package.json (paranoidjk) No manifest changes detected

@pr-triage pr-triage bot added PR: merged and removed PR: unreviewed labels Apr 15, 2019

@raybooysen raybooysen deleted the raybooysen:fix/cancelExistingDebounce branch Apr 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can鈥檛 perform that action at this time.