diff --git a/src/frontend/src/components/EditFlowSettingsComponent/index.tsx b/src/frontend/src/components/EditFlowSettingsComponent/index.tsx index 2445861b6..8f7bc5b98 100644 --- a/src/frontend/src/components/EditFlowSettingsComponent/index.tsx +++ b/src/frontend/src/components/EditFlowSettingsComponent/index.tsx @@ -34,16 +34,7 @@ export const EditFlowSettings: React.FC = ({ setIsMaxLength(false); } - if (value !== "") { - let newFlow = flows.find((f) => f.id === tabId); - if (newFlow) { - newFlow.name = value; - setName(value); - updateFlow(newFlow); - } - } else { - setName(value); - } + setName(value) }; const handleDescriptionChange = (event: ChangeEvent) => { diff --git a/src/frontend/src/icons/Weaviate/weaviate.svg b/src/frontend/src/icons/Weaviate/weaviate.svg index d5b3bda24..69b08beb5 100644 --- a/src/frontend/src/icons/Weaviate/weaviate.svg +++ b/src/frontend/src/icons/Weaviate/weaviate.svg @@ -1,8 +1,8 @@ - + - + @@ -16,19 +16,19 @@ - + - + - + - + - + @@ -36,106 +36,107 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + + - - - - + + + + - - + + - + - + - - + + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/src/frontend/src/modals/flowSettingsModal/index.tsx b/src/frontend/src/modals/flowSettingsModal/index.tsx index 02616cae6..e052e7791 100644 --- a/src/frontend/src/modals/flowSettingsModal/index.tsx +++ b/src/frontend/src/modals/flowSettingsModal/index.tsx @@ -35,6 +35,14 @@ export default function FlowSettingsModal() { } function handleSaveFlow(flow) { + if (name !== "") { + let newFlow = flows.find((f) => f.id === tabId); + if (newFlow) { + newFlow.name = name; + newFlow.description = description; + updateFlow(newFlow); + } + } try { updateFlowInDatabase(flow); // updateFlowStyleInDataBase(flow); @@ -73,6 +81,7 @@ export default function FlowSettingsModal() { onClick={() => { handleSaveFlow(flows.find((f) => f.id === tabId)); setSuccessData({ title: "Changes saved successfully" }); + closePopUp(); }} type="submit" > diff --git a/src/frontend/src/utils.ts b/src/frontend/src/utils.ts index 714eb795b..417927465 100644 --- a/src/frontend/src/utils.ts +++ b/src/frontend/src/utils.ts @@ -41,6 +41,7 @@ import { SearxIcon } from "./icons/Searx"; import { SlackIcon } from "./icons/Slack"; import clsx, { ClassValue } from "clsx"; import { twMerge } from "tailwind-merge"; +import { WeaviateIcon } from "./icons/Weaviate"; export function classNames(...classes: Array) { return classes.filter(Boolean).join(" "); @@ -174,7 +175,7 @@ export const nodeIcons: { // ReadTheDocsLoader: ReadTheDocsIcon, // does not work Searx: SearxIcon, SlackDirectoryLoader: SlackIcon, - // Weaviate: WeaviateIcon, + // Weaviate: WeaviateIcon, // does not work // WikipediaAPIWrapper: WikipediaIcon, // WolframAlphaQueryRun: WolframIcon, // WolframAlphaAPIWrapper: WolframIcon,