diff --git a/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx b/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx
index 70398c8af..98e989d5d 100644
--- a/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx
+++ b/src/frontend/src/CustomNodes/GenericNode/components/parameterComponent/index.tsx
@@ -136,7 +136,7 @@ export default function ParameterComponent({
nodeIconsLucide[item.family] ?? nodeIconsLucide["unknown"];
return (
- <>
+
{index === 0 && (
{left
@@ -183,7 +183,7 @@ export default function ParameterComponent({
- >
+
);
});
} else {
diff --git a/src/frontend/src/contexts/typesContext.tsx b/src/frontend/src/contexts/typesContext.tsx
index 7caf5eccc..9d8745bee 100644
--- a/src/frontend/src/contexts/typesContext.tsx
+++ b/src/frontend/src/contexts/typesContext.tsx
@@ -92,14 +92,22 @@ export function TypesProvider({ children }: { children: ReactNode }) {
}
}
- function deleteNode(idx: string) {
+ function deleteNode(idx: string | Array) {
reactFlowInstance!.setNodes(
- reactFlowInstance!.getNodes().filter((node: Node) => node.id !== idx)
+ reactFlowInstance!
+ .getNodes()
+ .filter((node: Node) =>
+ typeof idx === "string" ? node.id !== idx : !idx.includes(node.id)
+ )
);
reactFlowInstance!.setEdges(
reactFlowInstance!
.getEdges()
- .filter((edge) => edge.source !== idx && edge.target !== idx)
+ .filter((edge) =>
+ typeof idx === "string"
+ ? edge.source !== idx && edge.target !== idx
+ : !idx.includes(edge.source) && !idx.includes(edge.target)
+ )
);
}
return (
diff --git a/src/frontend/src/modals/genericModal/index.tsx b/src/frontend/src/modals/genericModal/index.tsx
index baebd67ba..4a4f80877 100644
--- a/src/frontend/src/modals/genericModal/index.tsx
+++ b/src/frontend/src/modals/genericModal/index.tsx
@@ -17,11 +17,7 @@ import { alertContext } from "../../contexts/alertContext";
import { postValidatePrompt } from "../../controllers/API";
import { genericModalPropsType } from "../../types/components";
import { handleKeyDown } from "../../utils/reactflowUtils";
-import {
- classNames,
- getRandomKeyByssmm,
- varHighlightHTML,
-} from "../../utils/utils";
+import { classNames, varHighlightHTML } from "../../utils/utils";
import BaseModal from "../baseModal";
export default function GenericModal({
@@ -97,19 +93,6 @@ export default function GenericModal({
.replace(regexHighlight, varHighlightHTML({ name: "$1" }))
.replace(/\n/g, "
");
- const TextAreaContentView = (): JSX.Element => {
- return (
- {
- setIsEdit(true);
- }}
- suppressWarning={true}
- />
- );
- };
-
function getClassByNumberLength(): string {
let sumOfCaracteres: number = 0;
wordsHighlight.forEach((element) => {
@@ -224,7 +207,14 @@ export default function GenericModal({
}}
/>
) : type === TypeModal.PROMPT && !isEdit ? (
-
+ {
+ setIsEdit(true);
+ }}
+ suppressWarning={true}
+ />
) : type !== TypeModal.PROMPT ? (