You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Hi! So our app recently changed version to 0.69.3 and maintained the react-native-swipe-list-view to 3.2.9.
After upgrading our app crashes whenever it involves closing any row item.
Upon further checking it seems that the reason behind it rowMap returns me the props instead of the actual rowMap object.
To Reproduce
To reproduce the scenario here is the code of my test screen:
`
import { View, Text, TouchableOpacity, StyleSheet } from 'react-native'
import React from 'react'
import { SwipeListView } from 'react-native-swipe-list-view'
import { faker } from '@faker-js/faker'
Describe the bug
Hi! So our app recently changed version to 0.69.3 and maintained the react-native-swipe-list-view to 3.2.9.
After upgrading our app crashes whenever it involves closing any row item.
Upon further checking it seems that the reason behind it rowMap returns me the props instead of the actual rowMap object.
To Reproduce
To reproduce the scenario here is the code of my test screen:
`
import { View, Text, TouchableOpacity, StyleSheet } from 'react-native'
import React from 'react'
import { SwipeListView } from 'react-native-swipe-list-view'
import { faker } from '@faker-js/faker'
const SwipeListViewTest = () => {
const dataTest = Array(5)
.fill("")
.map((_, i) => ({
key:
${i}
,text:
item #${i}
,data: [
{
productName: faker.commerce.productName(),
}
]
}))
const keyExtractor = (item: any, index: number) => {
return item.productName + index
}
const renderItem = (data: any, rowMap: any) => {
return (
<TouchableOpacity onPress={() => console.log('on press', rowMap)} style={styles.mainView}>
Test {data.item.productName}
)
}
return (
)
}
const styles = StyleSheet.create({
mainView: {
height: 50,
width: 200,
alignItems: 'center',
justifyContent: 'center',
backgroundColor: 'yellow',
alignSelf: 'center'
}
})
export default SwipeListViewTest
`
Screenshots
screen:
log:
Environment (please complete the following information):
I've read other similar issues like:
#360
#547
But it seems that it involves a keyExtractor problem but I think my keyExtractor works fine.
If you need additional info please let me know. I am not really sure what other packages are needed that could be affecting my app.
Thanks!
The text was updated successfully, but these errors were encountered: