mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2025-09-01 05:21:43 +02:00
Make API call on 3 or more characters
This commit is contained in:
@@ -69,6 +69,10 @@ export function AITermSuggestionInput(props: AITermSuggestionInputProps) {
|
|||||||
return [];
|
return [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (trimmedValue.length < 3) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
if (termCache.has(trimmedValue)) {
|
if (termCache.has(trimmedValue)) {
|
||||||
const cachedData = termCache.get(trimmedValue);
|
const cachedData = termCache.get(trimmedValue);
|
||||||
return cachedData || [];
|
return cachedData || [];
|
||||||
|
Reference in New Issue
Block a user