Skip to content

Commit

Permalink
fix: update autocomplete query length requirement
Browse files Browse the repository at this point in the history
  • Loading branch information
mert-ergun committed Jan 2, 2025
1 parent 2ba5d12 commit 4ecbed8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function AutocompleteTextField({ value, setValue, label, placeholder }) {

if (lastAtSymbol !== -1) {
const query = newValue.slice(lastAtSymbol + 1, cursorPosition);
if (query.length > 0) {
if (query.length > 2) {
const results = fuse.search(query);
const matchedSuggestions = results.map((result) => result.item);
setDisplaySuggestions(matchedSuggestions);
Expand Down

0 comments on commit 4ecbed8

Please sign in to comment.