Skip to content

Commit ed5872e

Browse files
vonovakfacebook-github-bot
authored andcommitted
Make sure refreshControl shows up on initial render if specified
Summary: [this commit](2e1707d) which was just a small refactor broke refreshControl behavior - if we render FlatList with refreshing=true, the refreshControl won't be visible on initial render. The problem is, the [previous beginRefreshing method](2e1707d#diff-cfafa8d7e42ab87ab863f917e187a4aeL51) was renamed to `beginRefreshingProgramatically` and the old call was left in one place [here](2e1707d#diff-cfafa8d7e42ab87ab863f917e187a4aeR47). Now, I am not sure what kind of jumping the mentioned commit was fixing, but since this fix only concerns the initial render, I believe it will not influence the jumping fix. I have tested this locally in my app, can provide a video if needed. none [IOS] [BUGFIX] [RefreshControl] - Make sure refreshControl shows up on initial render if specified Closes #17727 Differential Revision: D6827402 Pulled By: shergin fbshipit-source-id: 25849244e87af54f25d636b6ade7adcf88958980
1 parent 2fef1ba commit ed5872e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

React/Views/RCTRefreshControl.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ - (void)layoutSubviews
4444
// If the control is refreshing when mounted we need to call
4545
// beginRefreshing in layoutSubview or it doesn't work.
4646
if (_currentRefreshingState && _isInitialRender) {
47-
[self beginRefreshing];
47+
[self beginRefreshingProgrammatically];
4848
}
4949
_isInitialRender = false;
5050
}

0 commit comments

Comments
 (0)