dancormier / react-native-swipeout

iOS-style swipeout buttons behind component
MIT License
2.62k stars 645 forks source link

use custom component with autoClose #314

Open chiaraperino opened 5 years ago

chiaraperino commented 5 years ago

When I use custom component (Button react-native-elements), onPress doesn't close the swipe with autoClose = true

chiaraperino commented 5 years ago

I have resolved with component: View and onPress props:

<Swipeout autoClose backgroundColor="transparent" right={[{
    onPress: () => console.log("press"),
    component: (
      <View style={styles.deleteButton}>
        <Icon name="delete" size={propIcon(25)} color={colors.WHITE} />
      </View>
    ),
}]}>