Make API call on 3 or more characters

This commit is contained in:
Kamran Ahmed committed 2024-04-12 00:03:14 +01:00
1 parent c4c7499a22
commit c2a5e5a805
1 file changed
+4
@@ -69,6 +69,10 @@ export function AITermSuggestionInput(props: AITermSuggestionInputProps) {
return [];
}
if (trimmedValue.length < 3) {
return [];
}
if (termCache.has(trimmedValue)) {
const cachedData = termCache.get(trimmedValue);
return cachedData || [];