             title:  sanitize(m.title)
             search: "#{m.iid} #{m.title}"
 
-    if @dataSource
-      $.getJSON(@dataSource).done (data) ->
-        # load members
-        input.atwho 'load', '@', data.members
-        # load issues
-        input.atwho 'load', 'issues', data.issues
-        # load merge requests
-        input.atwho 'load', 'mergerequests', data.mergerequests
-        # load emojis
-        input.atwho 'load', ':', data.emojis
+  destroyAtWho: ->
+    @input.atwho('destroy')
+
+  fetchData: (dataSource) ->
+    $.getJSON(dataSource)
+
+  loadData: (data) ->
+    # load members
+    @input.atwho 'load', '@', data.members
+    # load issues
+    @input.atwho 'load', 'issues', data.issues
+    # load merge requests
+    @input.atwho 'load', 'mergerequests', data.mergerequests
+    # load emojis
+    @input.atwho 'load', ':', data.emojis

            title:    sanitize(title)
            search:   sanitize("#{m.username} #{m.name}")

    input.atwho
      at: '#'
      alias: 'issues'
      searchKey: 'search'


window.GitLab ?= {}
GitLab.GfmAutoComplete =
  dataLoading: false

  dataSource: ''

  # Emoji
