Make API call on 3 or more characters

pull/5495/head
Kamran Ahmed 8 months ago
parent c4c7499a22
commit c2a5e5a805
  1. 4
      src/components/GenerateRoadmap/AITermSuggestionInput.tsx

@ -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 || [];

Loading…
Cancel
Save