react-native-swipeable
react-native-swipeable copied to clipboard
The object error is showing rightButtons.length of null. I'm disable the right buttons swipe
<Swipeable rightButtons={ (condition)?[ buttons ]:null } >
Go the same issue, did you find a workaround?
<Swipeable rightButtons={solutions > 0 ? rightButtons : null}>
This did the trick for me.
Having the same problem. I would like to have an option to enable and disable dynamicly right or left buttons.
<Swipeable onRef={ref => (this.swipeable = ref)} onRightActionRelease={this._onRightActionRelease} rightButtons={ isSelected ? [ // eslint-disable-next-line react/jsx-key <Delete onPress={this._onRightActionRelease}> <Icon name="trash" size={30} /> </Delete> ] : {} } >