React native 在react native flatlist中滑动行dosent工作
我正在使用“react native swipe list view”(反应本机滑动列表视图)中的滑动,但当我尝试滑动时,它没有任何作用。我尝试以这种方式实现它。尝试在平面列表之外调用滑动行函数,但也不起作用。这两种方法都不起作用,任何人都可以帮助我。这是图书馆的特色React native 在react native flatlist中滑动行dosent工作,react-native,React Native,我正在使用“react native swipe list view”(反应本机滑动列表视图)中的滑动,但当我尝试滑动时,它没有任何作用。我尝试以这种方式实现它。尝试在平面列表之外调用滑动行函数,但也不起作用。这两种方法都不起作用,任何人都可以帮助我。这是图书馆的特色 <FlatList data={this.state.data.slice(0, 5)} maxToRenderPerBatch={6} render
<FlatList
data={this.state.data.slice(0, 5)}
maxToRenderPerBatch={6}
renderItem={({ item, index }) => (
<SwipeRow
leftOpenValue={75}
rightOpenValue={-75}>
<View >
<Text >Left</Text>
<Text>Right</Text>
</View>
<CardItem
style={{
paddingLeft: 5,
paddingRight: 5,
paddingBottom: 0,
backgroundColor: this.state.backgroundColor
}}>
<Left>
<Body>
<TouchableOpacity
onPress={() => {
this.props.navigation.navigate('NewsPage', {
newsData: (this.state.data),
url: (item.news_page_url),
title: (item.news_title),
news: (item.mobile_news_summary),
image: (item.image_url),
index: (index),
id: item.id,
newsImage: (item.news_image),
//related_news : (item.related_news)
});
}}
>
<Text
numberOfLines={3}
style={{
fontSize: 18,
fontWeight: "700",
color: this.state.component ? 'white' : '#343434',
fontFamily: 'sans-serif-light'
}}>
{item.news_title}
</Text>
</TouchableOpacity>
<Text
style={{
fontSize: 14,
color: '#B6B6B4',
fontWeight: 'bold',
}}>
{item.news_provider}
</Text>
<Text
style={{
fontSize: 12,
color: '#B6B6B4',
fontWeight: 'bold',
}}>
{item.news_datetime}
</Text>
</Body>
</Left>
</CardItem>
</SwipeRow>
)}
keyExtractor={({ id }, index) => id}
refreshing={this.state.refreshing}
onRefresh={this.handleLoadLess}
/>
(
左边
赖特
{
this.props.navigation.navigate('NewsPage'{
newsData:(this.state.data),
url:(item.news\u page\u url),
标题:(项目新闻标题),
新闻:(项目.手机新闻摘要),
图像:(item.image\u url),
索引:(索引),
id:item.id,
newsImage:(item.news_image),
//相关新闻:(项目.相关新闻)
});
}}
>
{item.news_title}
{item.news_provider}
{item.news_datetime}
)}
keyExtractor={({id},索引)=>id}
刷新={this.state.refreshing}
onRefresh={this.handleLoadLess}
/>
他们说的行通常在SwipeListView中使用,所以如果您不在SwipeListView中包装所有行,则该行不起作用