Skip to content

Commit

Permalink
Fix scroll on animation v2
Browse files Browse the repository at this point in the history
  • Loading branch information
WRadoslaw committed Jun 26, 2023
1 parent b3487c6 commit 19e00fa
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const MemberDropdown = forwardRef<HTMLDivElement, MemberDropdownProps>(
actions: { setAuthModalOpenName },
} = useAuthStore()
const [showWithdrawDialog, setShowWithdrawDialog] = useState(false)
const [disableScrollDuringAnimation, setDisableScrollDuringAnimation] = useState(false)
const [disableScrollDuringAnimation, setDisableScrollDuringAnimation] = useState(true)

const [showSendDialog, setShowSendDialog] = useState(false)
const { url: memberAvatarUrl } = getMemberAvatar(activeMembership)
Expand Down Expand Up @@ -113,6 +113,7 @@ export const MemberDropdown = forwardRef<HTMLDivElement, MemberDropdownProps>(
}, [closeDropdown, isActive])

const resetToDefaultState = useCallback(() => {
setDisableScrollDuringAnimation(true)
if (isActive) {
return
}
Expand Down Expand Up @@ -152,7 +153,7 @@ export const MemberDropdown = forwardRef<HTMLDivElement, MemberDropdownProps>(
in={!isList}
classNames={transitions.names.enterFromLeft}
onEntering={() => setDisableScrollDuringAnimation(true)}
onEntered={() => setDisableScrollDuringAnimation(false)}
onExiting={() => setDisableScrollDuringAnimation(true)}
unmountOnExit
mountOnEnter
>
Expand Down

0 comments on commit 19e00fa

Please sign in to comment.