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

Fix stable id extra compute and proptypes #743

Merged
merged 1 commit into from
Sep 17, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/core/RecyclerListView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -821,7 +821,7 @@ RecyclerListView.propTypes = {
//Provide your own ScrollView Component. The contract for the scroll event should match the native scroll event contract, i.e.
// scrollEvent = { nativeEvent: { contentOffset: { x: offset, y: offset } } }
//Note: Please extend BaseScrollView to achieve expected behaviour
externalScrollView: PropTypes.func,
externalScrollView: PropTypes.oneOfType([PropTypes.func, PropTypes.object]),

//Callback given when user scrolls to the end of the list or footer just becomes visible, useful in incremental loading scenarios
onEndReached: PropTypes.func,
Expand Down
2 changes: 1 addition & 1 deletion src/core/dependencies/DataProvider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export abstract class BaseDataProvider {
//No need to override this one
//If you already know the first row where rowHasChanged will be false pass it upfront to avoid loop
public cloneWithRows(newData: any[], firstModifiedIndex?: number): DataProvider {
const dp = this.newInstance(this.rowHasChanged, this.getStableId);
const dp = this.newInstance(this.rowHasChanged, this._hasStableIds ? this.getStableId : undefined);
const newSize = newData.length;
const iterCount = Math.min(this._size, newSize);
if (ObjectUtil.isNullOrUndefined(firstModifiedIndex)) {
Expand Down