Skip to content

Commit

Permalink
useReactFlow
Browse files Browse the repository at this point in the history
  • Loading branch information
aloccid-iata authored May 1, 2024
1 parent 7d9e45e commit 54576bd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/Visualizer/components/TableNode.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useState, FC, useEffect } from "react";
import { Handle, Position, NodeProps } from "reactflow";
import { Handle, Position, NodeProps, useReactFlow } from "reactflow";
import { KeyIcon, ArrayIcon } from "../components";
import { markdown } from "../helpers";

Expand All @@ -9,8 +9,8 @@ export const TableNode: FC<NodeProps> = ({ data }) => {
const [selectedColumn, setSelectedColumn] = useState("");
const [showDescription, setshowDescription] = useState(false);
const [descriptionOnHoverActive, setDescriptionOnHoverActive] = useState(false);
const { fitView } = useReactFlow();
const fitView = useReactFlow();

useEffect(() => {
document.addEventListener("keydown", (e: KeyboardEvent) => {
if(e.code === "ShiftLeft" || e.code === "ShiftRight") {
Expand Down

0 comments on commit 54576bd

Please sign in to comment.