Make API call on 3 or more characters
This commit is contained in:
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 || [];
|
||||
|
||||
Reference in new issue
Block a user