Fixed flow settings modal not editing description and not closing

This commit is contained in:
Lucas Oliveira 2023-06-15 08:34:17 -03:00
commit 435927df8e
4 changed files with 57 additions and 55 deletions

View file

@ -34,16 +34,7 @@ export const EditFlowSettings: React.FC<InputProps> = ({
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<HTMLTextAreaElement>) => {

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 110 KiB

After

Width:  |  Height:  |  Size: 109 KiB

Before After
Before After

View file

@ -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"
>

View file

@ -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<string>) {
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,