Skip to content

Fix SuperDatePicker isPaused prop update (again).#2298

Merged
walterra merged 3 commits intoelastic:masterfrom
walterra:fix-superdatepicker-interval-2
Sep 7, 2019
Merged

Fix SuperDatePicker isPaused prop update (again).#2298
walterra merged 3 commits intoelastic:masterfrom
walterra:fix-superdatepicker-interval-2

Conversation

@walterra
Copy link
Copy Markdown
Contributor

@walterra walterra commented Sep 6, 2019

Summary

Follow up to #2250.

While the approach to add componenDidUpdate() in the PR linked above was the right one, the way the interval was updated didn't work out as intended. The code didn't properly stop any previous running interval. This updated PR changes the code to call stopInterval() in any case similar to how onRefreshChange() works. I also added some more tests to run against the interval updates.

Checklist

  • Checked in dark mode doesn't touch DOM
  • Checked in mobile doesn't touch DOM
  • Checked in IE11 and Firefox doesn't touch DOM
  • Props have proper autodocs doesn't change existing props
  • Added documentation examples doesn't change features
  • Added or updated jest tests
  • Checked for breaking changes and labeled appropriately
  • Checked for accessibility including keyboard-only and screenreader modes
  • A changelog entry exists and is marked appropriately

@walterra walterra requested a review from pugnascotia September 6, 2019 08:08
….test.js

Co-Authored-By: Rory Hunter <pugnascotia@users.noreply.github.com>
@walterra walterra reopened this Sep 6, 2019
@walterra walterra merged commit 3c22135 into elastic:master Sep 7, 2019
@walterra walterra deleted the fix-superdatepicker-interval-2 branch September 7, 2019 13:47
thompsongl pushed a commit to thompsongl/eui that referenced this pull request Sep 10, 2019
Follow up to elastic#2250. While the approach to add componenDidUpdate() in the PR linked above was the right one, the way the interval was updated didn't work out as intended. The code didn't properly stop any previous running interval. This updated PR changes the code to call stopInterval() in any case similar to how onRefreshChange() works. I also added some more tests to run against the interval updates.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants