diff --git a/src/frontend/src/App.tsx b/src/frontend/src/App.tsx
index 0088081ae..6b0180720 100644
--- a/src/frontend/src/App.tsx
+++ b/src/frontend/src/App.tsx
@@ -1,5 +1,5 @@
import _ from "lodash";
-import { useContext, useEffect, useState } from "react";
+import { useContext, useEffect, useRef, useState } from "react";
import { useLocation } from "react-router-dom";
import "reactflow/dist/style.css";
import "./App.css";
@@ -121,6 +121,7 @@ export default function App() {
);
};
+
return (
//need parent component with width and height
diff --git a/src/frontend/src/components/AccordionComponent/index.tsx b/src/frontend/src/components/AccordionComponent/index.tsx
index 7212e6a1b..29405171b 100644
--- a/src/frontend/src/components/AccordionComponent/index.tsx
+++ b/src/frontend/src/components/AccordionComponent/index.tsx
@@ -32,6 +32,13 @@ export default function AccordionComponent({
value === "" ? setValue(keyValue) : setValue("");
}
+ const handleKeyDown = (event) => {
+ if (event.key === "Backspace") {
+ event.preventDefault();
+ event.stopPropagation();
+ }
+ };
+
return (
<>
{
onChange(e.target.value);
}}
+ onKeyDown={(e) => {
+ handleKeyDown(e, value, '0');
+ }}
/>
);
diff --git a/src/frontend/src/components/inputComponent/index.tsx b/src/frontend/src/components/inputComponent/index.tsx
index 78b06c411..bad1d68b3 100644
--- a/src/frontend/src/components/inputComponent/index.tsx
+++ b/src/frontend/src/components/inputComponent/index.tsx
@@ -2,6 +2,7 @@ import { useEffect, useState } from "react";
import { InputComponentType } from "../../types/components";
import { classNames } from "../../utils/utils";
import { Input } from "../ui/input";
+import { handleKeyDown } from "../../utils/reactflowUtils";
export default function InputComponent({
value,
@@ -19,6 +20,7 @@ export default function InputComponent({
}
}, [disabled, onChange]);
+
return (
{
onChange(e.target.value);
}}
+ onKeyDown={(e) => {
+ handleKeyDown(e, value, '');
+ }}
/>
{password && (