Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

fix(ui): secret path input showing / for a valid value that comes delayed

Akhil Mohan61a0997adccb
diff --git a/frontend/src/components/v2/SecretPathInput/SecretPathInput.tsx b/frontend/src/components/v2/SecretPathInput/SecretPathInput.tsx
index 1487cb302a..ed97ad8dd5 100644
--- a/frontend/src/components/v2/SecretPathInput/SecretPathInput.tsx
+++ b/frontend/src/components/v2/SecretPathInput/SecretPathInput.tsx
@@ -46,14 +46,6 @@ export const SecretPathInput = ({
setInputValue(propValue ?? "/");
}, [propValue]);
- useEffect(() => {
- if (environment) {
- setInputValue("/");
- setSecretPath("/");
- onChange?.("/");
- }
- }, [environment]);
-
useEffect(() => {
// update secret path if input is valid
if (
@@ -158,9 +150,8 @@ export const SecretPathInput = ({
key={`secret-reference-secret-${i + 1}`}
>
<div
- className={`${
- highlightedIndex === i ? "bg-gray-600" : ""
- } text-md relative mb-0.5 flex w-full cursor-pointer select-none items-center justify-between rounded-md px-2 py-1 outline-none transition-all hover:bg-mineshaft-500 data-[highlighted]:bg-mineshaft-500`}
+ className={`${highlightedIndex === i ? "bg-gray-600" : ""
+ } text-md relative mb-0.5 flex w-full cursor-pointer select-none items-center justify-between rounded-md px-2 py-1 outline-none transition-all hover:bg-mineshaft-500 data-[highlighted]:bg-mineshaft-500`}
>
<div className="flex gap-2">
<div className="flex items-center text-yellow-700">