Commit dc1c7b7f authored by Phil Hughes's avatar Phil Hughes

Highlights first row when filtering in dropdowns

parent 1b55e5af
...@@ -214,6 +214,17 @@ class GitLabDropdown ...@@ -214,6 +214,17 @@ class GitLabDropdown
callback: (data) => callback: (data) =>
currentIndex = -1 currentIndex = -1
@parseData data @parseData data
unless @filterInput.val() is ''
selector = '.dropdown-content li:not(.divider):visible'
if @dropdown.find('.dropdown-toggle-page').length
selector = ".dropdown-page-one #{selector}"
$(selector, @dropdown)
.first()
.find('a')
.addClass('is-focused')
enterCallback: (e) => enterCallback: (e) =>
@selectRowAtIndex(e, 0) @selectRowAtIndex(e, 0)
......
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