jemise111/react-native-swipe-list-view

closeOnRowPress and closeOnRowOpen not working!

mekhamata opened this issue · 1 comments

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}> <WhiteAddressButton title={title} btnId={index} desc={theaddress} /> </TouchablePlatform> ); }; const renderHiddenItem = ({index,item,section})=>{ const {title,theaddress,id} = item; return( <View style={styles.throwBackContainer}> <TouchablePlatform containerStyle={styles.throwBackContainer_left} onPress={()=>{alert("hi")}}> <Icon name='trash' style={styles.throwBackContainer_leftIcon} /> </TouchablePlatform> <TouchablePlatform containerStyle={styles.throwBackContainer_right} onPress={()=>{alert("hi")}}> <Icon name='trash' style={styles.throwBackContainer_leftIcon} /> </TouchablePlatform> </View> ); };

any help?

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