Commit 30eeb453 authored by Alfredo Sumaran's avatar Alfredo Sumaran

Remove unused instance variable

parent c3773584
...@@ -35,7 +35,6 @@ class @SearchAutocomplete ...@@ -35,7 +35,6 @@ class @SearchAutocomplete
@createAutocomplete() @createAutocomplete()
@searchInput.addClass('disabled') @searchInput.addClass('disabled')
@autocomplete = false
@bindEvents() @bindEvents()
...@@ -60,10 +59,6 @@ class @SearchAutocomplete ...@@ -60,10 +59,6 @@ class @SearchAutocomplete
getData: (term, callback) -> getData: (term, callback) ->
_this = @ _this = @
# Ensure this is not called when autocomplete is disabled because
# this method still will be called because `GitLabDropdownFilter` is triggering this on keyup
return if @autocomplete is false
# Do not trigger request if input is empty # Do not trigger request if input is empty
return if @searchInput.val() is '' return if @searchInput.val() is ''
...@@ -118,15 +113,12 @@ class @SearchAutocomplete ...@@ -118,15 +113,12 @@ class @SearchAutocomplete
@clearInput.on 'click', @onRemoveLocationClick @clearInput.on 'click', @onRemoveLocationClick
enableAutocomplete: -> enableAutocomplete: ->
return if @autocomplete
dropdownMenu = @dropdown.find('.dropdown-menu') dropdownMenu = @dropdown.find('.dropdown-menu')
_this = @ _this = @
@loadingSuggestions = false @loadingSuggestions = false
@dropdown.addClass('open') @dropdown.addClass('open')
@searchInput.removeClass('disabled') @searchInput.removeClass('disabled')
@autocomplete = true
onDropdownOpen: (e) => onDropdownOpen: (e) =>
@dropdown.dropdown('toggle') @dropdown.dropdown('toggle')
...@@ -239,12 +231,9 @@ class @SearchAutocomplete ...@@ -239,12 +231,9 @@ class @SearchAutocomplete
@wrap.removeClass('has-location-badge') @wrap.removeClass('has-location-badge')
disableAutocomplete: -> disableAutocomplete: ->
if @autocomplete @searchInput.addClass('disabled')
@searchInput.addClass('disabled') @dropdown.removeClass('open')
@dropdown.removeClass('open') @restoreMenu()
@restoreMenu()
@autocomplete = false
restoreMenu: -> restoreMenu: ->
html = "<ul> html = "<ul>
......
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