mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-09 16:28:19 +00:00
Merge pull request #4676 from Infisical/fix/overviewEditRowFetchSecret
Fix secret value fetching to prioritize folder secrets over imported ones
This commit is contained in:
+5
-2
@@ -82,6 +82,7 @@ type Props = {
|
||||
isImported: boolean;
|
||||
}[];
|
||||
}[];
|
||||
isSecretPresent?: boolean;
|
||||
};
|
||||
|
||||
export const SecretEditRow = ({
|
||||
@@ -101,7 +102,8 @@ export const SecretEditRow = ({
|
||||
isRotatedSecret,
|
||||
importedBy,
|
||||
importedSecret,
|
||||
isEmpty
|
||||
isEmpty,
|
||||
isSecretPresent
|
||||
}: Props) => {
|
||||
const { handlePopUpOpen, handlePopUpToggle, handlePopUpClose, popUp } = usePopUp([
|
||||
"editSecret"
|
||||
@@ -113,7 +115,8 @@ export const SecretEditRow = ({
|
||||
|
||||
const [isFieldFocused, setIsFieldFocused] = useToggle();
|
||||
|
||||
const fetchSecretValueParams = importedSecret
|
||||
const fetchSecretValueParams =
|
||||
importedSecret && !isSecretPresent
|
||||
? {
|
||||
environment: importedSecret.environment,
|
||||
secretPath: importedSecret.secretPath,
|
||||
|
||||
+1
@@ -284,6 +284,7 @@ export const SecretOverviewTableRow = ({
|
||||
environment={slug}
|
||||
isRotatedSecret={secret?.isRotatedSecret}
|
||||
importedBy={importedBy}
|
||||
isSecretPresent={Boolean(secret)}
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
Reference in New Issue
Block a user