Skip to content

[EuiSuperDatePicker] Add onRefresh handler#1577

Merged
sorenlouv merged 11 commits into
elastic:masterfrom
sorenlouv:timepicker-refresh
Feb 25, 2019
Merged

[EuiSuperDatePicker] Add onRefresh handler#1577
sorenlouv merged 11 commits into
elastic:masterfrom
sorenlouv:timepicker-refresh

Conversation

@sorenlouv
Copy link
Copy Markdown
Contributor

@sorenlouv sorenlouv commented Feb 20, 2019

When setting the refresh rate on EuiSuperDatePicker it should keep track of the interval, and call the onRefresh handler whenever the interval fires.
This will save consumers the hassle of implementing this logic themselves.

Checklist

  • Any props added have proper autodocs
  • Documentation examples were added
  • A changelog entry exists and is marked appropriately
  • This was checked for breaking changes and labeled appropriately
  • Jest tests were updated or added to match the most common scenarios

@sorenlouv sorenlouv requested a review from nreese February 20, 2019 07:19
Comment thread src/components/date_picker/super_date_picker/super_date_picker.js Outdated
Comment thread src/components/date_picker/super_date_picker/async_interval.js
@sorenlouv sorenlouv marked this pull request as ready for review February 20, 2019 22:20
@sorenlouv sorenlouv changed the title [EuiSuperDatePicker] Add onRefresh handler (WIP) [EuiSuperDatePicker] Add onRefresh handler Feb 20, 2019
@sorenlouv
Copy link
Copy Markdown
Contributor Author

@nreese How do you suggest we document this feature?

@nreese
Copy link
Copy Markdown
Contributor

nreese commented Feb 22, 2019

How do you suggest we document this feature

@cchaos and @chandlerprall any thoughts on how best to document?

@cchaos
Copy link
Copy Markdown
Contributor

cchaos commented Feb 22, 2019

Move the EuiSuperDatePicker to it's own page and split up the examples to address all these edge cases.

@sorenlouv
Copy link
Copy Markdown
Contributor Author

sorenlouv commented Feb 22, 2019

Move the EuiSuperDatePicker to it's own page and split up the examples to address all these edge cases.
@cchaos

Is this a refactor of the EuiSuperDatePicker docs, or just for the new onRefresh prop I'm adding? Not quite sure how much is expected of me to land this PR.

Comment thread src/components/date_picker/super_date_picker/super_date_picker.js
Comment thread src/components/date_picker/super_date_picker/super_date_picker.js
Comment thread src/components/date_picker/super_date_picker/super_date_picker.js Outdated
@sorenlouv
Copy link
Copy Markdown
Contributor Author

Feedback addressed.

Copy link
Copy Markdown
Contributor

@cchaos cchaos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! There's just a few outstanding items in the PR checklist to cover, like a changelog entry.

Copy link
Copy Markdown
Contributor

@nreese nreese left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm
code review

Comment thread src-docs/src/views/date_picker/super_date_picker.js
@sorenlouv sorenlouv merged commit 644fd63 into elastic:master Feb 25, 2019
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.

5 participants