fix: you should check hasMore before loadMore#193
Open
success-cg wants to merge 1 commit intodanbovey:masterfrom
Open
fix: you should check hasMore before loadMore#193success-cg wants to merge 1 commit intodanbovey:masterfrom
success-cg wants to merge 1 commit intodanbovey:masterfrom
Conversation
|
You probably didn't intend to, but you've made unnecessary changes to |
joshuaobrien
suggested changes
Jan 2, 2019
| @@ -1,385 +0,0 @@ | |||
| 'use strict'; | |||
There was a problem hiding this comment.
This shouldn't have been deleted. After making your changes, you should generate a new dist file. This can be done by running npm run build.
| .idea | ||
| .nyc_output | ||
| coverage | ||
| dist/ |
| version "0.3.2" | ||
| resolved "https://registry.yarnpkg.com/array-unique/-/array-unique-0.3.2.tgz#a894b75d4bc4f6cd679ef3244a9fd8f46ae2d428" | ||
|
|
||
| array.prototype.flat@^1.2.1: |
There was a problem hiding this comment.
Given the nature of this PR, I don't think the lockfile should be updated
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
you should check hasMore before loadMore function be called,because in my project,I find a bug:
there is not any more data from server, and props.hasMore is false, but your InfiniteScroller will be loadMore once more again. By the way, it's a h5-mobile web. I was debugger , find the offset will be less than 0, such as -78 by calculate, so even if the hasMore is false, but the loadMore function will be called once more;
I think, you should check hasMore before loadMore function be called;