【问题标题】:ReactNative FlatList detect scroll to the last Item on ListReactNative FlatList 检测滚动到 List 上的最后一项
【发布时间】:2021-02-19 07:42:51
【问题描述】:

如何检测用户是否已滚动到 FlatList 列表的末尾,以便我可以添加一个页脚消息“您现在位于列表的末尾”。

我们将不胜感激。

【问题讨论】:

    标签: reactjs react-native redux infinite-scroll react-native-flatlist


    【解决方案1】:

    您可以在 Flatlist 中使用页眉/页脚组件 例如,

    <FlatList
        .....
       ListFooterComponent={<Text>You're now at the end of the list</Text>}
    /> 
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2020-08-29
      • 2018-01-18
      • 2019-06-24
      • 2021-01-18
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多