From 5ff30aed102dc9c08b84e4875faee639c3e96293 Mon Sep 17 00:00:00 2001 From: Sheen Capadngan Date: Fri, 26 Apr 2024 18:46:16 +0800 Subject: [PATCH] fix: addressed suggestion incomplete issue --- .../src/components/v2/SecretPathInput/SecretPathInput.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/frontend/src/components/v2/SecretPathInput/SecretPathInput.tsx b/frontend/src/components/v2/SecretPathInput/SecretPathInput.tsx index 3a097f29da..348da6a88a 100644 --- a/frontend/src/components/v2/SecretPathInput/SecretPathInput.tsx +++ b/frontend/src/components/v2/SecretPathInput/SecretPathInput.tsx @@ -43,10 +43,7 @@ export const SecretPathInput = ({ }); useEffect(() => { - const initialValue = propValue ?? "/"; - setInputValue(initialValue); - setSecretPath(initialValue); - onChange?.({ target: { value: initialValue } } as any); + setInputValue(propValue ?? "/"); }, [propValue]); useEffect(() => { @@ -69,7 +66,6 @@ export const SecretPathInput = ({ // filter suggestions based on matching const searchFragment = debouncedInputValue.split("/").pop() || ""; - const filteredSuggestions = folders .filter((suggestionEntry) => suggestionEntry.toUpperCase().startsWith(searchFragment.toUpperCase())