diff --git a/src/frontend/src/components/keypairListComponent/index.tsx b/src/frontend/src/components/keypairListComponent/index.tsx
index 034628643..9f452c988 100644
--- a/src/frontend/src/components/keypairListComponent/index.tsx
+++ b/src/frontend/src/components/keypairListComponent/index.tsx
@@ -12,10 +12,11 @@ export default function KeypairListComponent({
disabled,
editNode = false,
duplicateKey,
+ isList = true,
}: KeyPairListComponentType): JSX.Element {
useEffect(() => {
if (disabled && value.length > 0 && value[0] !== "") {
- onChange([""]);
+ onChange([{ "": "" }]);
}
}, [disabled]);
@@ -79,6 +80,7 @@ export default function KeypairListComponent({
: "keypair" + (index + 100).toString()
}
type="text"
+ disabled={disabled}
value={obj[key]}
className={editNode ? "input-edit-node" : ""}
placeholder="Type a value..."
@@ -87,7 +89,7 @@ export default function KeypairListComponent({
}
/>
- {index === ref.current.length - 1 ? (
+ {isList && index === ref.current.length - 1 ? (
- ) : (
+ ) : isList ? (
+ ) : (
+ ""
)}
);