fix: address functional issues with secret input

This commit is contained in:
Sheen Capadngan
2024-05-01 03:03:40 +08:00
parent 74f866715f
commit dcaa7f1fce

View File

@@ -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();
} }
}; };