diff --git a/frontend/components/dashboard/DashboardInputField.js b/frontend/components/dashboard/DashboardInputField.js index eb4934c08..bba626207 100644 --- a/frontend/components/dashboard/DashboardInputField.js +++ b/frontend/components/dashboard/DashboardInputField.js @@ -1,9 +1,11 @@ -import React from "react"; +import React, { useRef } from "react"; import { faCircle } from "@fortawesome/free-solid-svg-icons"; import { FontAwesomeIcon } from "@fortawesome/react-fontawesome"; import guidGenerator from "../utilities/randomId"; +const REGEX = /([$]{.*?})/g; + /** * This function splits the input of a dashboard field into the parts that are inside and outside of ${...} * @param {string} text - the value of the input in the Dashboard Input Field @@ -73,55 +75,53 @@ const DashboardInputField = ({ ); } else if (type === "value") { + const ref = useRef(null); + + const syncScroll = (e) => { + ref.current.scrollTop = e.target.scrollTop; + ref.current.scrollLeft = e.target.scrollLeft; + }; + return (