Commit 9008457a authored by Alfredo Sumaran's avatar Alfredo Sumaran

Save instance and avoid multiple instantiation

parent b96d049e
......@@ -117,7 +117,7 @@ class GitLabDropdown
@parseData @fullData
}
# Init filiterable
# Init filterable
if @options.filterable
@filter = new GitLabDropdownFilter @dropdown,
filterInputBlur: @filterInputBlur
......@@ -327,4 +327,6 @@ class GitLabDropdown
$.fn.glDropdown = (opts) ->
return @.each ->
new GitLabDropdown @, opts
if (!$.data @, 'glDropdown')
$.data(@, 'glDropdown', new GitLabDropdown @, opts)
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