Commit 07a0278d authored by Alfredo Sumaran's avatar Alfredo Sumaran

Do not show dropdown menu if when no suggestions returned

parent d681623c
...@@ -79,6 +79,11 @@ class @SearchAutocomplete ...@@ -79,6 +79,11 @@ class @SearchAutocomplete
project_ref: @projectRef project_ref: @projectRef
term: term term: term
}, (response) -> }, (response) ->
# Hide dropdown menu if no suggestions returns
if !response.length
_this.disableAutocomplete()
return
data = [] data = []
# List results # List results
...@@ -228,10 +233,6 @@ class @SearchAutocomplete ...@@ -228,10 +233,6 @@ class @SearchAutocomplete
@dropdown.removeClass 'open' @dropdown.removeClass 'open'
# Only add class if there's a badge
# if @badgePresent()
# @searchInput.addClass 'disabled'
badgePresent: -> badgePresent: ->
@locationBadgeEl.children().length @locationBadgeEl.children().length
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment