BigW Consortium Gitlab

Commit 07a0278d by Alfredo Sumaran

Do not show dropdown menu if when no suggestions returned

parent d681623c
......@@ -79,6 +79,11 @@ class @SearchAutocomplete
project_ref: @projectRef
term: term
}, (response) ->
# Hide dropdown menu if no suggestions returns
if !response.length
_this.disableAutocomplete()
return
data = []
# List results
......@@ -228,10 +233,6 @@ class @SearchAutocomplete
@dropdown.removeClass 'open'
# Only add class if there's a badge
# if @badgePresent()
# @searchInput.addClass 'disabled'
badgePresent: ->
@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