I've got this error while try to trigger closeRow function :
undefined is not an object (evaluating 'rowMap[rowKey].closeRow')
I'm using FlatList option. This is my closeRow function code:
closeRow(rowMap, rowKey) {
rowMap[rowKey].closeRow();
}
This is my trigger touch code :
<TouchableOpacity onPress={ _ => this.closeRow(rowMap, rowData.item.id) }>
This is SwipeListView (FlatList). When I swipe spesific row, another row I've swiped not closing automatically.

Please help.
Hey @nzrin can I see the structure of your data and how you're using the key property or if you're passing a keyExtractor prop, thanks!
Yes sure, this is my structure of data :
{
"data": [
{
"id": 3,
"name": "Daging Burger",
"quantity": 80
},
{
"id": 5,
"name": "Sos",
"quantity": 21
},
{
"id": 6,
"name": "Lada Hitam",
"quantity": 14
},
{
"id": 7,
"name": "Mayonis",
"quantity": 46
},
{
"id": 27,
"name": "Cheesy",
"quantity": 6
},
{
"id": 81,
"name": "Kokpu",
"quantity": 10
}
]
}
Can you try adding a key to your data, so it looks like
"data": [
{
"key": 3,
"id": 3,
"name": "Daging Burger",
"quantity": 80
},
...
or using a key extractor prop:
<SwipeLisView
keyExtractor={(item, index) => item.id}
...
/>
and seeing if that fixes it?
Thank you! It works fine when I use keyExtractor.
馃憤 glad to hear it
Most helpful comment
Can you try adding a
keyto your data, so it looks likeor using a key extractor prop:
and seeing if that fixes it?