Skip to content

Commit f8647f2

Browse files
committed
spread prevState instead
1 parent d6c65ed commit f8647f2

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/index.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -152,8 +152,7 @@ export default class InfiniteScroll extends Component<Props, State> {
152152
// reset when data changes
153153
if (dataLengthChanged) {
154154
return {
155-
showLoader: false,
156-
pullToRefreshThresholdBreached: false,
155+
...prevState,
157156
prevDataLength: nextProps.dataLength,
158157
};
159158
}

0 commit comments

Comments
 (0)