mirror of
https://github.com/zhigang1992/react-native-bottom-sheet.git
synced 2026-01-12 17:42:17 +08:00
fix: reset isclosing variable when position changed
This commit is contained in:
@@ -338,10 +338,6 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
|
||||
if (_providedOnChange) {
|
||||
_providedOnChange(index);
|
||||
}
|
||||
|
||||
if (isClosing.current && (index === 0 || index === -1)) {
|
||||
isClosing.current = false;
|
||||
}
|
||||
});
|
||||
const handleSettingScrollableRef = useCallback(
|
||||
(scrollableRef: ScrollableRef) => {
|
||||
@@ -539,6 +535,11 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
|
||||
call([currentPosition], args => {
|
||||
const currentPositionIndex = snapPoints.indexOf(args[0]);
|
||||
|
||||
/**
|
||||
* reset is closing
|
||||
*/
|
||||
isClosing.current = false;
|
||||
|
||||
/**
|
||||
* if animation was interrupted, we ignore the change.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user