Closed danibonilha closed 5 months ago
Latest commit: 2a69fbc378074be150944de34432252c9428aa2f
The changes in this PR will be included in the next version bump.
Not sure what this means? Click here to learn what changesets are.
Click here if you're a maintainer who wants to add another changeset to this PR
Hey @MarceloPrado thanks for the review! I don't have the bandwidth this week to address your comments, if there's any rush to merge this, please feel free to make edits. Otherwise I'll happily update it as soon as things calm down.
@danibonilha don't worry, I'll make the changes and get it over the finish line. Thanks again for the contribution 🙏
@danibonilha good news: I was able to fix the need for the -2
offset: fabbd70
https://github.com/MarceloPrado/flash-calendar/assets/8047841/d9d4edf5-8c0a-4ba0-a231-b504dd7a736e
First of all, thanks @MarceloPrado for this library it is so much better than any other available library for react native.
This PR aims to give more flexibility to users by exposing
scrollToOffset
method to calendarRef and also adds a new ref method to scroll to a week row,scrollToWeek
. The motivation for this new method comes from my project's design with a fixedweekHeader
but I figured it could be useful for other people.My project example:
https://github.com/MarceloPrado/flash-calendar/assets/20520102/0a40554c-f517-44e5-8797-611f7eeee50e
Flash calendar storybook:
https://github.com/MarceloPrado/flash-calendar/assets/20520102/20d7f056-d1f7-4633-8d0e-e701e837b6c4
I'd also suggest to change the name of
scrollToDate
toscrollToMonth
, because at first I thought the behavior was to scroll to the date/row itself rather than to MonthHeader, but that would have an impact on the API so I understand it might not be a priority since the docs explain the behavior.