-
Notifications
You must be signed in to change notification settings - Fork 189
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
Issue #1410 Changed function name to LoadAutoScroll #1453
Conversation
@klee214 I noticed that there is an error at onScroll on line 16. Would you like me to add it to props validation and start the PR again? |
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.
Sorry I didn't notice that please change the Line 55 OnClick
-----> OnScroll
. Also you might need to change the parent component if it use onClick
instead of onScroll
@klee214 I changed the onScroll to onClick. |
@@ -13,7 +13,7 @@ const useStyles = makeStyles((theme) => ({ | |||
}, | |||
})); | |||
|
|||
function LoadMoreButton({ onScroll }) { | |||
function LoadAutoScroll({ onClick }) { |
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.
Other way around, this prop needs to be onScroll
and below on the propTypes you need onScroll
too. You can see how it's called at
<LoadAutoScroll onScroll={() => nextPage()} key={`load-more-button-${pages.length}`} /> |
onScroll
function.
Issue This PR Addresses
Fixes #1410
Type of Change
Description
Changed the function name from LoadMoreButton to LoadAutoScroll
Changed onScroll to onClick
Checklist