-
Notifications
You must be signed in to change notification settings - Fork 734
dean-added-auto-scroll-classifier #1474
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
dean-added-auto-scroll-classifier #1474
Conversation
src/components/carousel/types.tsx
Outdated
@@ -105,6 +106,7 @@ export interface CarouselState { | |||
pageHeight: number; | |||
initialOffset: PointPropType; | |||
prevProps: CarouselProps; | |||
// isAutoScrolled:boolean //dean |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is that needed?
// isAutoScrolled:boolean //dean |
src/components/carousel/index.tsx
Outdated
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest to run document formatting to remove all redundant spaces that were added
If you use VSCode you can run the Format Document
on the file
src/components/carousel/types.tsx
Outdated
@@ -40,7 +40,7 @@ export interface CarouselProps extends ScrollViewProps { | |||
/** | |||
* callback for when page has changed | |||
*/ | |||
onChangePage?: (newPageIndex: number, oldPageIndex: number) => void; | |||
onChangePage?: (newPageIndex: number, oldPageIndex: number, isAutoScrolled: boolean) => void; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Consider passing the new (last) argument as an object of "info"
If in the future we'll have to pass more info props then instead of adding more arguments, we'll just add to this info object you created.
0755ac4
to
372d2ac
Compare
…-auto-or-manually
Description
i added a parameter "isAutoScrolled" on the "onChangePage" method to classify if the image was auto or manually scrolled.
Changelog
the change was in this file "src/components/carousel/index.tsx" lines 40,47,171,264