jemise111 / react-native-swipe-list-view

A React Native ListView component with rows that swipe open and closed
https://www.npmjs.com/package/react-native-swipe-list-view
MIT License
2.78k stars 528 forks source link

closeOnRowPress and closeOnRowOpen not working! #592

Open mekhamata opened 2 years ago

mekhamata commented 2 years ago

Hi, i have a problem with closeOnRowOpen and closeOnRowPress, no action happend! i expect the row close when i click on it or when i swipe another row. here is my code: <SwipeListView data={useraddresses} renderItem={renderItems} renderHiddenItem={renderHiddenItem} leftOpenValue={75} disableLeftSwipe={true} closeOnRowOpen={true} closeOnRowPress={true} //rightOpenValue={-75} />

this is my renders: `const renderItems = ({index,item,section})=>{ const {title,theaddress,id} = item; return( <TouchablePlatform onPress={()=>navigation.navigate(id)} style={styles.MM_SECTION_PRESS_VIEW}>

    </TouchablePlatform>
);

}; const renderHiddenItem = ({index,item,section})=>{ const {title,theaddress,id} = item; return(

{alert("hi")}}> {alert("hi")}}>
);

};`

any help?

pnthach95 commented 2 years ago

Each item must include a unique key property or keyExtractor must be implemented to ensure full functionality

I just made it working after read that note