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

fetchMoreTresholdBreached #78

Open
javaxiu opened this issue Mar 10, 2023 · 0 comments
Open

fetchMoreTresholdBreached #78

javaxiu opened this issue Mar 10, 2023 · 0 comments

Comments

@javaxiu
Copy link

javaxiu commented Mar 10, 2023

i think this should be a useRef ,

let pullToRefreshThresholdBreached: boolean = false;

because when dragging is happening, something like loading state would change the children props, which will cause this FunctionComponent re-call, then, this fetchMoreTresholdBreached flag would be false again, in tihs situation, here

var onScroll = function (e) {
    /**
         * Check if component has already called onFetchMore
         */
    if (fetchMoreTresholdBreached) return;

it may not work as expected

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant