From 88f86eb6f44d4870f1ee4559043bd52a6fec29a8 Mon Sep 17 00:00:00 2001 From: Jordan Eldredge Date: Mon, 17 Sep 2018 08:32:52 -0700 Subject: [PATCH] Fix context menu bug I guess React does not like it when these are strings --- js/components/ContextMenu.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/js/components/ContextMenu.tsx b/js/components/ContextMenu.tsx index 23947a2a..8faa183c 100644 --- a/js/components/ContextMenu.tsx +++ b/js/components/ContextMenu.tsx @@ -34,8 +34,8 @@ class Portal extends React.Component { render() { const style = { - top: String(this.props.top), - left: String(this.props.left), + top: this.props.top, + left: this.props.left, // WTF Typescript. There's got to be a better way. position: "absolute" as "absolute" }; @@ -78,7 +78,10 @@ export const LinkNode = (props: LinkNodeProps) => ( interface NodeProps { label: string; checked: boolean; + hotkey?: string; className?: string; + // TODO: Figure out how to do passthrough props + onClick?: () => void; } export const Node = (props: NodeProps) => {