mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-02 23:25:51 +00:00
fix(ui): secret path input showing / for a valid value that comes delayed
This commit is contained in:
@@ -46,14 +46,6 @@ export const SecretPathInput = ({
|
|||||||
setInputValue(propValue ?? "/");
|
setInputValue(propValue ?? "/");
|
||||||
}, [propValue]);
|
}, [propValue]);
|
||||||
|
|
||||||
useEffect(() => {
|
|
||||||
if (environment) {
|
|
||||||
setInputValue("/");
|
|
||||||
setSecretPath("/");
|
|
||||||
onChange?.("/");
|
|
||||||
}
|
|
||||||
}, [environment]);
|
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
// update secret path if input is valid
|
// update secret path if input is valid
|
||||||
if (
|
if (
|
||||||
@@ -158,9 +150,8 @@ export const SecretPathInput = ({
|
|||||||
key={`secret-reference-secret-${i + 1}`}
|
key={`secret-reference-secret-${i + 1}`}
|
||||||
>
|
>
|
||||||
<div
|
<div
|
||||||
className={`${
|
className={`${highlightedIndex === i ? "bg-gray-600" : ""
|
||||||
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`}
|
||||||
} 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 gap-2">
|
||||||
<div className="flex items-center text-yellow-700">
|
<div className="flex items-center text-yellow-700">
|
||||||
|
|||||||
Reference in New Issue
Block a user