electron flow type definitions
Summary: Adding a flowtype library definition for electron 3 and fixing related type errors Reviewed By: passy Differential Revision: D9124758 fbshipit-source-id: e09cb5b05ba952e7f95f68f9043edc586f81ae83
This commit is contained in:
committed by
Facebook Github Bot
parent
69eaedcbb0
commit
75dfbf51f8
@@ -281,7 +281,8 @@ class Button extends styled.StylableComponent<
|
||||
position.x = parseInt(left, 10);
|
||||
position.y = parseInt(bottom + 6, 10);
|
||||
}
|
||||
menu.popup(electron.remote.getCurrentWindow(), {
|
||||
menu.popup({
|
||||
window: electron.remote.getCurrentWindow(),
|
||||
async: true,
|
||||
...position,
|
||||
});
|
||||
|
||||
@@ -37,7 +37,7 @@ export default class ContextMenuProvider extends Component<{|
|
||||
onContextMenu = () => {
|
||||
const menu = electron.remote.Menu.buildFromTemplate(this._menuTemplate);
|
||||
this._menuTemplate = [];
|
||||
menu.popup(electron.remote.getCurrentWindow(), {async: true});
|
||||
menu.popup({window: electron.remote.getCurrentWindow(), async: true});
|
||||
};
|
||||
|
||||
render() {
|
||||
|
||||
@@ -161,7 +161,8 @@ export default class FilterToken extends PureComponent<Props> {
|
||||
}
|
||||
const menu = electron.remote.Menu.buildFromTemplate(menuTemplate);
|
||||
const {bottom, left} = this._ref ? this._ref.getBoundingClientRect() : {};
|
||||
menu.popup(electron.remote.getCurrentWindow(), {
|
||||
menu.popup({
|
||||
window: electron.remote.getCurrentWindow(),
|
||||
async: true,
|
||||
x: parseInt(left, 10),
|
||||
y: parseInt(bottom, 10) + 8,
|
||||
|
||||
Reference in New Issue
Block a user