From 42745ea0245b5805ee04f7fc11f383c5dab449de Mon Sep 17 00:00:00 2001 From: Alexander Zinchuk Date: Mon, 24 Jan 2022 04:41:51 +0100 Subject: [PATCH] [Perf] Menu: Fix missing heavy animation events --- src/components/ui/Menu.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/ui/Menu.tsx b/src/components/ui/Menu.tsx index 0e2495cd..ec638f0c 100644 --- a/src/components/ui/Menu.tsx +++ b/src/components/ui/Menu.tsx @@ -80,7 +80,7 @@ const Menu: FC = ({ useHistoryBack(isOpen, onClose, undefined, undefined, autoClose); useEffectWithPrevDeps(([prevIsOpen]) => { - if (prevIsOpen !== undefined) { + if (isOpen || (!isOpen && prevIsOpen === true)) { dispatchHeavyAnimationEvent(ANIMATION_DURATION); } }, [isOpen]);