fix: integration tests / refresh menu position properly

Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
Roman committed 2022-04-07 13:02:49 +03:00
1 parent 1a83e0abb3
commit 3f01d2617a
1 file changed
+2 -2
+2 -2
View File
@@ -144,7 +144,7 @@ export class Menu extends React.Component<MenuProps, State> {
} }
} }
refreshPosition = () => { refreshPosition = () => requestAnimationFrame(() => {
if (!this.props.usePortal || !this.opener || !this.elem) { if (!this.props.usePortal || !this.opener || !this.elem) {
return; return;
} }
@@ -187,7 +187,7 @@ export class Menu extends React.Component<MenuProps, State> {
left: renderMenuLeft ? menuOnLeftSidePosition : menuOnRightSidePosition, left: renderMenuLeft ? menuOnLeftSidePosition : menuOnRightSidePosition,
}, },
}); });
}; });
open() { open() {
if (this.isOpen) { if (this.isOpen) {