I'm encountering an issue with the SwipeListView component.
I'm closing an opened row manually with the closeRow method which works and closes the row. By reopening the exact same row with a gesture (swiping to the right) the animation goes clearly faster than the first time I opened it. If I close it again with the closeRow method, and then re-open it a 3rd time, it swipes even faster.
I think that the "velocity" depends on the row's position (if you swipe just a bit, or if you swipe all the way to the edge of your screen) and this position value isn't reset when calling closeRow.
I might be wrong, but that's what it feels like.
Also, if I swipe on another row right after this, this other row works fine (for the first swipe). So this is related to each row individually.
Hopefully this statement is clear enough. Here is the list as used.
<SwipeListView
onEndReached={this.props.isFull ? null : this.listViewProps.onEndReached}
data={this.props.data}
keyExtractor={this.keyExtractor}
removeClippedSubviews={false}
renderItem={this.renderItem}
keyboardShouldPersistTaps="handled"
directionalDistanceChangeThreshold={15}
friction={10}
tension={10}
rightOpenValue={-(this.props.swipableOptions?.rightOffset || 100)}
leftOpenValue={this.props.swipableOptions?.leftOffset || 100}
disableRightSwipe={!!this.props.swipableOptions?.right}
disableLeftSwipe={!!this.props.swipableOptions?.left}
previewRowKey={!this.props.swipableListUsed[this.props.name] ? '0' : ''}
previewOpenValue={8}
previewDuration={100}
/>
Thanks in advance
Hey @GuillaumeMunsch thanks for the example code but sadly I can't reproduce this issue at all. I've tried both an iOS and Android device. This sounds similar to an issue that was fixed in a recent release. Could you please ensure you're using the latest release (at least v2.0.1) and see if that fixes the issue. If not could you please let me know:
What platform you're seeing this on?
What version of RN you're using?
If you could provide a sample video of the issue too that would really be helpful, thanks so much!
We updated to 2.0.3 and it looks like it is fixed indeed !
Thanks ! Closing
Most helpful comment
We updated to
2.0.3and it looks like it is fixed indeed !Thanks ! Closing