Added editNode variable on global variables for inputs

This commit is contained in:
Lucas Oliveira 2024-03-26 22:28:42 +02:00
commit d123d5b64f
4 changed files with 5 additions and 1 deletions

View file

@ -37,7 +37,7 @@ export default function Dropdown({
>
{({ open }) => (
<>
<div className={"relative mt-1"}>
<div className={"relative"}>
<Listbox.Button
data-test={`${id ?? ""}`}
className={

View file

@ -17,6 +17,7 @@ export default function InputGlobalComponent({
setDb,
name,
data,
editNode = false,
}: InputGlobalComponentType): JSX.Element {
const globalVariablesEntries = useGlobalVariablesStore(
(state) => state.globalVariablesEntries
@ -70,6 +71,7 @@ export default function InputGlobalComponent({
return (
<InputComponent
id={"input-" + name}
editNode={editNode}
disabled={disabled}
password={data.node?.template[name].password ?? false}
value={data.node?.template[name].value ?? ""}

View file

@ -261,6 +261,7 @@ const EditNodeModal = forwardRef(
) : (
<InputGlobalComponent
disabled={disabled}
editNode={true}
onChange={(value) =>
handleOnNewValue(value, templateParam)
}

View file

@ -78,6 +78,7 @@ export type InputGlobalComponentType =
setDb: (value: boolean) => void,
name: string,
data: NodeDataType,
editNode?: boolean,
};
export type KeyPairListComponentType = {