Add option to submit the typed query

This commit is contained in:
Alfredo Sumaran 2016-03-27 13:27:49 -05:00
parent c1e7351b4a
commit d681623c71

View file

@ -100,6 +100,16 @@ class @SearchAutocomplete
text: suggestion.label
url: suggestion.url
# Add option to proceed with the search
if data.length
data.push('separator')
data.push
text: "Result name contains \"#{term}\""
url: "/search?\
search=#{term}\
&project_id=#{_this.projectInputEl.val()}\
&group_id=#{_this.groupInputEl.val()}"
callback(data)
).always ->
_this.loadingSuggestions = false