Commit 62b260cc authored by Alfredo Sumaran's avatar Alfredo Sumaran

Change key name to match input Id

Fixes input not being restored with its original value
parent 8c1d50e6
...@@ -70,6 +70,7 @@ class @SearchAutocomplete ...@@ -70,6 +70,7 @@ class @SearchAutocomplete
# Prevent multiple ajax calls # Prevent multiple ajax calls
return if @loadingSuggestions return if @loadingSuggestions
# Do not request suggestions if dropdown is disabled
return if @badgePresent() return if @badgePresent()
@loadingSuggestions = true @loadingSuggestions = true
...@@ -102,7 +103,7 @@ class @SearchAutocomplete ...@@ -102,7 +103,7 @@ class @SearchAutocomplete
serializeState: -> serializeState: ->
{ {
# Search Criteria # Search Criteria
project_id: @projectInputEl.val() search_project_id: @projectInputEl.val()
group_id: @groupInputEl.val() group_id: @groupInputEl.val()
search_code: @searchCodeInputEl.val() search_code: @searchCodeInputEl.val()
repository_ref: @repositoryInputEl.val() repository_ref: @repositoryInputEl.val()
...@@ -232,9 +233,6 @@ class @SearchAutocomplete ...@@ -232,9 +233,6 @@ class @SearchAutocomplete
# _location isnt a input # _location isnt a input
break if input is '_location' break if input is '_location'
# renamed to avoid tests to fail
if input is 'project_id' then input = 'search_project_id'
@getElement("##{input}").val('') @getElement("##{input}").val('')
removeLocationBadge: -> removeLocationBadge: ->
......
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