diff --git a/src/pages/tasks/TaskAssigneeSelectorModal.js b/src/pages/tasks/TaskAssigneeSelectorModal.js index cee84cdd1a93..8ef9bf1414f7 100644 --- a/src/pages/tasks/TaskAssigneeSelectorModal.js +++ b/src/pages/tasks/TaskAssigneeSelectorModal.js @@ -119,8 +119,12 @@ function TaskAssigneeSelectorModal(props) { }, [props, searchValue, allPersonalDetails, isLoading]); useEffect(() => { - updateOptions(); - }, [searchValue, updateOptions]); + const debouncedSearch = _.debounce(updateOptions, 200); + debouncedSearch(); + return () => { + debouncedSearch.cancel(); + }; + }, [updateOptions]); const onChangeText = (newSearchTerm = '') => { setSearchValue(newSearchTerm);