Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.
TypeScript acmeagentsai-agentscertificate-managementdevsecopsenvironment-variableskubernetesopen-sourcepampkipostgresprivate-caprivileged-access-managementsecret-managementsecret-managersecretssecrets-managementsecuritysecurity-toolsvault
refactor: call modify fns with id instead of index
lemmy mwaurab3a50d657d74
diff --git a/frontend/components/dashboard/DashboardInputField.tsx b/frontend/components/dashboard/DashboardInputField.tsxindex 7a5b4a048d..cda6b381b7 100644--- a/frontend/components/dashboard/DashboardInputField.tsx+++ b/frontend/components/dashboard/DashboardInputField.tsx@@ -7,8 +7,8 @@ import guidGenerator from "../utilities/randomId";const REGEX = /([$]{.*?})/g;interface DashboardInputFieldProps {- index: number;- onChangeHandler: (value: string, index: number) => void;+ id: string;+ onChangeHandler: (value: string, id: string) => void;value: string;type: "varName" | "value";blurred: boolean;@@ -18,7 +18,7 @@ interface DashboardInputFieldProps {/*** This component renders the input fields on the dashboard* @param {object} obj - the order number of a keyPair- * @param {number} obj.index - the order number of a keyPair+ * @param {string} obj.id - the order number of a keyPair* @param {function} obj.onChangeHandler - what happens when the input is modified* @param {string} obj.type - whether the input field is for a Key Name or for a Key Value* @param {string} obj.value - value of the InputField@@ -28,7 +28,7 @@ interface DashboardInputFieldProps {*/const DashboardInputField = ({- index,+ id,onChangeHandler,type,value,@@ -57,7 +57,7 @@ const DashboardInputField = ({><inputonChange={(e) =>- onChangeHandler(e.target.value.toUpperCase(), index)+ onChangeHandler(e.target.value.toUpperCase(), id)}type={type}value={value}@@ -87,7 +87,7 @@ const DashboardInputField = ({><inputvalue={value}- onChange={(e) => onChangeHandler(e.target.value, index)}+ onChange={(e) => onChangeHandler(e.target.value, id)}onScroll={syncScroll}className={`${blurred