Formatting on merge
This commit is contained in:
parent
7239223481
commit
66cec7d545
5 changed files with 23 additions and 27 deletions
|
|
@ -40,10 +40,10 @@ export const EditFlowSettings: React.FC<InputProps> = ({
|
||||||
const [desc, setDesc] = useState(
|
const [desc, setDesc] = useState(
|
||||||
flows.find((f) => f.id === tabId).description
|
flows.find((f) => f.id === tabId).description
|
||||||
);
|
);
|
||||||
|
|
||||||
const handleDescriptionChange = (event: ChangeEvent<HTMLTextAreaElement>) => {
|
const handleDescriptionChange = (event: ChangeEvent<HTMLTextAreaElement>) => {
|
||||||
flows.find((f) => f.id === tabId).description = event.target.value;
|
flows.find((f) => f.id === tabId).description = event.target.value;
|
||||||
setDesc(flows.find((f) => f.id === tabId).description)
|
setDesc(flows.find((f) => f.id === tabId).description);
|
||||||
setDescription(event.target.value);
|
setDescription(event.target.value);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,9 @@
|
||||||
import { useEffect, useState, useContext } from "react";
|
import { useContext, useEffect, useState } from "react";
|
||||||
import { InputListComponentType } from "../../types/components";
|
import { InputListComponentType } from "../../types/components";
|
||||||
|
|
||||||
import _, { set } from "lodash";
|
import _ from "lodash";
|
||||||
import IconComponent from "../genericIconComponent";
|
|
||||||
import { PopUpContext } from "../../contexts/popUpContext";
|
import { PopUpContext } from "../../contexts/popUpContext";
|
||||||
|
import IconComponent from "../genericIconComponent";
|
||||||
|
|
||||||
export default function InputListComponent({
|
export default function InputListComponent({
|
||||||
value,
|
value,
|
||||||
|
|
|
||||||
|
|
@ -22,12 +22,12 @@ import {
|
||||||
TableRow,
|
TableRow,
|
||||||
} from "../../components/ui/table";
|
} from "../../components/ui/table";
|
||||||
import { limitScrollFieldsModal } from "../../constants/constants";
|
import { limitScrollFieldsModal } from "../../constants/constants";
|
||||||
|
import { PopUpContext } from "../../contexts/popUpContext";
|
||||||
import { TabsContext } from "../../contexts/tabsContext";
|
import { TabsContext } from "../../contexts/tabsContext";
|
||||||
import { typesContext } from "../../contexts/typesContext";
|
import { typesContext } from "../../contexts/typesContext";
|
||||||
import { NodeDataType } from "../../types/flow";
|
import { NodeDataType } from "../../types/flow";
|
||||||
import { classNames, getRandomKeyByssmm } from "../../utils/utils";
|
import { classNames, getRandomKeyByssmm } from "../../utils/utils";
|
||||||
import BaseModal from "../baseModal";
|
import BaseModal from "../baseModal";
|
||||||
import { PopUpContext } from "../../contexts/popUpContext";
|
|
||||||
|
|
||||||
const EditNodeModal = forwardRef(
|
const EditNodeModal = forwardRef(
|
||||||
(
|
(
|
||||||
|
|
@ -75,7 +75,6 @@ const EditNodeModal = forwardRef(
|
||||||
setCloseEdit(getRandomKeyByssmm().toString());
|
setCloseEdit(getRandomKeyByssmm().toString());
|
||||||
}, [modalOpen]);
|
}, [modalOpen]);
|
||||||
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<BaseModal size="large-h-full" open={modalOpen} setOpen={setModalOpen}>
|
<BaseModal size="large-h-full" open={modalOpen} setOpen={setModalOpen}>
|
||||||
<BaseModal.Trigger>{children}</BaseModal.Trigger>
|
<BaseModal.Trigger>{children}</BaseModal.Trigger>
|
||||||
|
|
|
||||||
|
|
@ -97,10 +97,8 @@ export default function GenericModal({
|
||||||
}, [inputValue, type]);
|
}, [inputValue, type]);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
setInputValue(value)
|
setInputValue(value);
|
||||||
}, [value])
|
}, [value]);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const coloredContent = (inputValue || "")
|
const coloredContent = (inputValue || "")
|
||||||
.replace(/</g, "<")
|
.replace(/</g, "<")
|
||||||
|
|
|
||||||
|
|
@ -94,24 +94,23 @@ export default function NodeToolbarComponent({ data, setData, deleteNode }) {
|
||||||
|
|
||||||
<ShadTooltip content="Edit" side="top">
|
<ShadTooltip content="Edit" side="top">
|
||||||
<div>
|
<div>
|
||||||
<EditNodeModal
|
<EditNodeModal
|
||||||
data={data}
|
data={data}
|
||||||
setData={setData}
|
setData={setData}
|
||||||
nodeLength={nodeLength}
|
nodeLength={nodeLength}
|
||||||
>
|
|
||||||
<div
|
|
||||||
className={classNames(
|
|
||||||
"relative -ml-px inline-flex items-center rounded-r-md bg-background px-2 py-2 text-foreground shadow-md ring-1 ring-inset ring-ring transition-all duration-500 ease-in-out hover:bg-muted focus:z-10" +
|
|
||||||
(nodeLength == 0
|
|
||||||
? " text-muted-foreground"
|
|
||||||
: " text-foreground")
|
|
||||||
)}
|
|
||||||
>
|
>
|
||||||
<IconComponent name="Settings2" className="h-4 w-4 " />
|
<div
|
||||||
</div>
|
className={classNames(
|
||||||
</EditNodeModal>
|
"relative -ml-px inline-flex items-center rounded-r-md bg-background px-2 py-2 text-foreground shadow-md ring-1 ring-inset ring-ring transition-all duration-500 ease-in-out hover:bg-muted focus:z-10" +
|
||||||
|
(nodeLength == 0
|
||||||
|
? " text-muted-foreground"
|
||||||
|
: " text-foreground")
|
||||||
|
)}
|
||||||
|
>
|
||||||
|
<IconComponent name="Settings2" className="h-4 w-4 " />
|
||||||
|
</div>
|
||||||
|
</EditNodeModal>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</ShadTooltip>
|
</ShadTooltip>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue