diff --git a/src/View.tsx b/src/View.tsx index 79d9230..86abc3c 100644 --- a/src/View.tsx +++ b/src/View.tsx @@ -380,7 +380,7 @@ const View = ({ graph }: Props) => { return () => { // anything in here is fired on component unmount. }; - }, [settings, cyHandle, filters, matchFullWord]); + }, [settings, cyHandle, filters, matchFullWord, selected]); // keydown listener for deleting elements useEffect(() => {