[英]FlatList refresh indicator is blocking touch event after the indicator disappears
I'm using ReactNative FlatList. 我正在使用ReactNative FlatList。
I can't listen to touch events on the space where the refresh indicator appears when I refresh. 刷新时,我听不到刷新指示符出现的空间上的触摸事件。
When I refresh, the refresh indicator appears, and as the refreshing is done, it disappears. 刷新时,刷新指示器出现,并且刷新完成后消失。
But I can't click on the button(listen to press event) placed on the same spot as the indicator. 但是我不能单击与指示器位于同一位置的按钮(听事件)。
I tried the RN inspector on the device. 我在设备上尝试了RN检查器。 When I tried to inspect the button, inspector found a
<RefreshControl>
, not the button. 当我尝试检查按钮时,检查器发现
<RefreshControl>
而不是按钮。 But refreshing was definitely finished. 但是,刷新肯定已经结束。 Value of the
refreshing
prop was false
. refreshing
道具的价值是false
。
I have no idea why it's happening. 我不知道为什么会这样。
Please can someone give me any hint or let me know if it's some kind of a bug? 请有人能给我任何提示或让我知道是否是某种错误吗?
Please share your code snippet. 请分享您的代码段。 I want to check which props of FlatList you are using and you can take reference from here.
我想检查您正在使用FlatList的哪些道具,您可以从这里参考。 https://github.com/kajal-mittal/Samachar/blob/d4dc049ae2a38110d7fa88285cf732487800299c/src/Components/NewsScene.js
https://github.com/kajal-mittal/Samachar/blob/d4dc049ae2a38110d7fa88285cf732487800299c/src/Components/NewsScene.js
<FlatList
data={[{key: 'a'}, {key: 'b'}]}
renderItem={({item}) => <Text>{item.key}</Text>}
removeClippedSubviews={false}
refreshing={
<RefreshControl refreshing={this.state.refreshing} onRefresh={this._onRefresh.bind(this)} />
}/>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.