react-native-swipe-list-view icon indicating copy to clipboard operation
react-native-swipe-list-view copied to clipboard

closeOnRowPress and closeOnRowOpen not working!

Open mekhamata opened this issue 2 years ago • 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?

mekhamata avatar Feb 23 '22 16:02 mekhamata

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

pnthach95 avatar Apr 22 '22 14:04 pnthach95