Fix search select issues.

This commit is contained in:
Patrick Fic
2023-10-16 10:24:16 -07:00
parent 612e359d4c
commit 85e3c5a433
2 changed files with 5 additions and 2 deletions

View File

@@ -33,7 +33,9 @@ const JobSearchSelect = (
useLazyQuery(SEARCH_JOBS_BY_ID_FOR_AUTOCOMPLETE);
const executeSearch = (v) => {
if (v && v !== "" && v.length >= 3) callSearch(v);
console.log(v);
if (v && v.variables?.search !== "" && v.variables.search.length >= 2)
callSearch(v);
};
const debouncedExecuteSearch = _.debounce(executeSearch, 500);

View File

@@ -21,7 +21,8 @@ const OwnerSearchSelect = ({ value, onChange, onBlur, disabled }, ref) => {
useLazyQuery(SEARCH_OWNERS_BY_ID_FOR_AUTOCOMPLETE);
const executeSearch = (v) => {
if (v && v !== "" && v.length >= 3) callSearch(v);
if (v && v.variables?.search !== "" && v.variables.search.length >= 2)
callSearch(v);
};
const debouncedExecuteSearch = _.debounce(executeSearch, 500);