Closed csetiawan closed 3 years ago
Thanks @csetiawan ! This looks good. Does this need any more testing?
For some reason, I can't get the test working with Jest. It's complaining about Preset react-native not found
. Otherwise, I've tested this feature manually and it worked great on my project. BTW, how often do you release another build? Thanks!
@peacechen, I've added a rudimentary unit test for Scroller and upgraded Jest in order to get the testing working on my machine.
Thanks @csetiawan
Does the change in .babelrc
to "module:metro-react-native-babel-preset" affect consumers of this library? Or does that only affect local testing and sample project? Please confirm that the sample project continues to run properly.
Regarding my comment above about minDate & maxDate, I think it would be better if the scroller moved to maxDate if the given date exceeds it, or to minDate if the given date precedes that. A no-op is more confusing to users who don't see any effect if their date is outside the bounds. Alternatively, issue a yellow box warning for the out-of-bounds conditions.
@peacechen, I've just confirmed that the example works as expected. I'm pretty sure that .babelrc is only for jest and no transformation needed for the source code anyway. Also, I've updated the code to follow your suggestions on min/max date fallback.
Thanks for authoring and updating this PR 👍
Implementing updateWeekView() when scroller enabled as mentioned at #241. Also updating the TS def to reflect the latest updateWeekView()