-
Notifications
You must be signed in to change notification settings - Fork 24.8k
Closed
Labels
Ran CommandsOne of our bots successfully processed a command.One of our bots successfully processed a command.StaleThere has been a lack of activity on this issue and it may be closed soon.There has been a lack of activity on this issue and it may be closed soon.
Description
Is this a bug report?
when my flatList data changed, the layout changed but refresh indicator on top of flatList is not always shows loading automatically, I have to pull it down a little bit then the indicator stick on flatList, or it just shows at a blink when the data really changed, not shows at whole async data changed time as expected.
Have you read the Contributing Guidelines?
yes
Environment
react-native -v
: 0.46.0node -v
: v6.9.1npm -v
: 3.10.8yarn --version
: 0.24.5
-
Target Platform: iOS
android works fine -
Development Operating System: macOS
-
Build tools: Xcode
Steps to Reproduce
- set refreshing state to true then call api, but refresh indicator on flatList not always automatically pull down
- api back then data changed, it pull down at a blink, set refreshing state to false
Expected Behavior
loading indicator should show right after api called.
Actual Behavior
it shows and disappear quickly on data changed.
onRefresh = async () => {
this.setState({
isRefreshing: true
});
await this.props.searchProducts(this.state.searchString);
await this.setState({
data: this.props.products.searchProductsIds.map(
id => this.props.products.searchProductsById[id]
)
});
this.setState({
isRefreshing: false
});
};
<FlatList
removeClippedSubviews={false}
onRefresh={this.onRefresh}
refreshing={this.state.refreshing}
extraData={this.extraData}
data={this.state.data}
renderItem={this.renderItem}
keyExtractor={product => product.id}
contentContainerStyle={styles.listContainer}
onEndReached={this.handleLoadMore}
onEndReachedThreshold={5}
/>
esamattis, heysem-useinsider, ocarreterom, dinodsaurus, bbrodsky and 21 moreSanchitB23 and tanvo-agilityio
Metadata
Metadata
Assignees
Labels
Ran CommandsOne of our bots successfully processed a command.One of our bots successfully processed a command.StaleThere has been a lack of activity on this issue and it may be closed soon.There has been a lack of activity on this issue and it may be closed soon.