[Perf] Menu: Fix missing heavy animation events

This commit is contained in:
Alexander Zinchuk 2022-01-24 04:41:51 +01:00
parent 43aa99c6e3
commit 42745ea024

View File

@ -80,7 +80,7 @@ const Menu: FC<OwnProps> = ({
useHistoryBack(isOpen, onClose, undefined, undefined, autoClose);
useEffectWithPrevDeps(([prevIsOpen]) => {
if (prevIsOpen !== undefined) {
if (isOpen || (!isOpen && prevIsOpen === true)) {
dispatchHeavyAnimationEvent(ANIMATION_DURATION);
}
}, [isOpen]);