Do not show dropdown menu if when no suggestions returned
This commit is contained in:
parent
d681623c71
commit
07a0278d63
1 changed files with 5 additions and 4 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in a new issue