[Perf] Menu: Fix missing heavy animation events
This commit is contained in:
parent
43aa99c6e3
commit
42745ea024
@ -80,7 +80,7 @@ const Menu: FC<OwnProps> = ({
|
|||||||
useHistoryBack(isOpen, onClose, undefined, undefined, autoClose);
|
useHistoryBack(isOpen, onClose, undefined, undefined, autoClose);
|
||||||
|
|
||||||
useEffectWithPrevDeps(([prevIsOpen]) => {
|
useEffectWithPrevDeps(([prevIsOpen]) => {
|
||||||
if (prevIsOpen !== undefined) {
|
if (isOpen || (!isOpen && prevIsOpen === true)) {
|
||||||
dispatchHeavyAnimationEvent(ANIMATION_DURATION);
|
dispatchHeavyAnimationEvent(ANIMATION_DURATION);
|
||||||
}
|
}
|
||||||
}, [isOpen]);
|
}, [isOpen]);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user