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

Add scrollTimeTo() method #205

Merged
merged 2 commits into from
May 23, 2022
Merged

Conversation

pdpino
Copy link
Collaborator

@pdpino pdpino commented May 16, 2022

Fixes part of #204

@pdpino pdpino added type: feature enhancements or new features status: PR - ready labels May 16, 2022
README.md Outdated
@@ -125,6 +125,7 @@ To use the component methods save a reference to it:
* **`goToDate(date, animated = true)`**: the component navigates to a custom date. Note: if the target date has not been rendered before, there may be a delay on the animation. See [this issue](https://github.com/hoangnm/react-native-week-view/issues/54) for details.
* **`goToNextPage(animated = true)`**: the component navigates to the next page (to the future). Note: if `prependMostRecent` is `true`, and the component is near the last page rendered, there may be a delay on the animation.
* **`goToPrevPage(animated = true)`**: the component navigates to the previous page (to the past). Note: if `prependMostRecent` is `false` (the default), and the component is near the first page rendered, there may be a delay on the animation.
* **`scrollTimeTo(minutes, options = { animated = false })`**: scroll vertically to a time in the day, provided in minutes. For example, to scroll to 13:00 hrs: `ref.scrollTimeTo(13 * 60)`.
Copy link
Owner

Choose a reason for hiding this comment

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

I think scrollToTime might be nicer. WDYT, @pdpino ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah you are right, sounds more natural

@hoangnm
Copy link
Owner

hoangnm commented May 23, 2022

Thanks again for the PR, @pdpino !

@hoangnm hoangnm merged commit 2854181 into hoangnm:master May 23, 2022
@pdpino pdpino deleted the feature/scroll-time-to branch May 24, 2022 17:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: feature enhancements or new features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants