Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 9 additions & 23 deletions src/components/bottomSheet/BottomSheet.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1126,15 +1126,12 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
* exit method if :
* - layout is not calculated.
* - already animating to next position.
* - sheet is forced closing.
*/
const { nextPosition, nextIndex, isForcedClosing } =
animatedAnimationState.get();
const { nextPosition, nextIndex } = animatedAnimationState.get();
if (
!isLayoutCalculated.value ||
index === nextIndex ||
targetPosition === nextPosition ||
isForcedClosing
targetPosition === nextPosition
) {
return;
}
Expand Down Expand Up @@ -1177,14 +1174,9 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
* exit method if :
* - layout is not calculated.
* - already animating to next position.
* - sheet is forced closing.
*/
const { nextPosition, isForcedClosing } = animatedAnimationState.get();
if (
!isLayoutCalculated ||
targetPosition === nextPosition ||
isForcedClosing
) {
const { nextPosition } = animatedAnimationState.get();
if (!isLayoutCalculated.value || targetPosition === nextPosition) {
return;
}

Expand Down Expand Up @@ -1344,15 +1336,12 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
* exit method if :
* - layout is not calculated.
* - already animating to next position.
* - sheet is forced closing.
*/
const { nextPosition, nextIndex, isForcedClosing } =
animatedAnimationState.get();
const { nextPosition, nextIndex } = animatedAnimationState.get();
if (
!isLayoutCalculated.value ||
targetIndex === nextIndex ||
targetPosition === nextPosition ||
isForcedClosing
targetPosition === nextPosition
) {
return;
}
Expand Down Expand Up @@ -1399,15 +1388,12 @@ const BottomSheetComponent = forwardRef<BottomSheet, BottomSheetProps>(
* exit method if :
* - layout is not calculated.
* - already animating to next position.
* - sheet is forced closing.
*/
const { nextPosition, nextIndex, isForcedClosing } =
animatedAnimationState.get();
const { nextPosition, nextIndex } = animatedAnimationState.get();
if (
!isLayoutCalculated ||
!isLayoutCalculated.value ||
nextIndex === 0 ||
targetPosition === nextPosition ||
isForcedClosing
targetPosition === nextPosition
) {
return;
}
Expand Down