diff --git a/src/js/models/maps/viewfinder/ViewfinderModel.js b/src/js/models/maps/viewfinder/ViewfinderModel.js index fc94ac246..3d7e438ac 100644 --- a/src/js/models/maps/viewfinder/ViewfinderModel.js +++ b/src/js/models/maps/viewfinder/ViewfinderModel.js @@ -42,20 +42,13 @@ define( initialize({ mapModel }) { this.geocoderSearch = new GeocoderSearch(); this.mapModel = mapModel; - - this.autocompleteSearch = _.debounce( - this.notDebouncedAutocompleteSearch, - 250, // milliseconds - ); }, /** * Get autocompletion predictions from the GeocoderSearch model. - * This function should be debounced to prevent sending many requests to - * the API while the user is still typing. * @param {string} rawQuery is the user's search query with spaces. */ - async notDebouncedAutocompleteSearch(rawQuery) { + async autocompleteSearch(rawQuery) { const query = rawQuery.trim(); if (this.get('query') === query) { return; diff --git a/src/js/templates/maps/viewfinder/viewfinder-prediction.html b/src/js/templates/maps/viewfinder/viewfinder-prediction.html index 6f3329b5b..52715cf37 100644 --- a/src/js/templates/maps/viewfinder/viewfinder-prediction.html +++ b/src/js/templates/maps/viewfinder/viewfinder-prediction.html @@ -1,4 +1,7 @@ -