Merge pull request #1769 from Infisical/fix/address-functional-issues-with-secret-input

fix: address functional issues with secret input
This commit is contained in:
Maidul Islam
2024-05-02 11:26:06 -04:00
committed by GitHub
@@ -38,12 +38,7 @@ type ReferenceItem = {
export const InfisicalSecretInput = ({ export const InfisicalSecretInput = ({
value: propValue, value: propValue,
isVisible,
containerClassName, containerClassName,
onBlur,
isDisabled,
isImport,
isReadOnly,
secretPath: propSecretPath, secretPath: propSecretPath,
environment: propEnvironment, environment: propEnvironment,
onChange, onChange,
@@ -276,10 +271,7 @@ export const InfisicalSecretInput = ({
handleSuggestionSelect(); handleSuggestionSelect();
} }
if ( if (["ArrowDown", "ArrowUp", "Enter"].includes(e.key) && isPopupOpen) {
(["ArrowDown", "ArrowUp"].includes(e.key) && isPopupOpen) ||
(e.key === "Enter" && highlightedIndex >= 0)
) {
e.preventDefault(); e.preventDefault();
} }
}; };