Currently, if the drawer is swiped quickly, it will always pass snap points and close / open fully. There are many use cases where this is undesirable (snap points have specific meanings or other state effects and should always be passed-through). This would be a very easy change. We could have an alwaysSnapToNextPoint optional prop or some such thing
// use-snap-points.ts:152
if (!alwaysSnapToNextPoint && velocity > 2 && !hasDraggedUp) {
if (dismissible) closeDrawer();
else snapToPoint(snapPointsOffset[0]); // snap to initial point
return;
}
if (!alwaysSnapToNextPoint && velocity > 2 && hasDraggedUp && snapPointsOffset && snapPoints) {
snapToPoint(snapPointsOffset[snapPoints.length - 1] as number);
return;
}
Currently, if the drawer is swiped quickly, it will always pass snap points and close / open fully. There are many use cases where this is undesirable (snap points have specific meanings or other state effects and should always be passed-through). This would be a very easy change. We could have an
alwaysSnapToNextPoint
optional prop or some such thing