1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00

fix: integration tests / refresh menu position properly

Signed-off-by: Roman <ixrock@gmail.com>
This commit is contained in:
Roman 2022-04-07 13:02:49 +03:00
parent 1a83e0abb3
commit 3f01d2617a

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) {