Select the first list item after changing the list filter

This commit is contained in:
Nathan Sobo
2012-10-03 21:04:44 -10:00
parent a4c25f1cb7
commit 1e9b40a6ea
2 changed files with 4 additions and 1 deletions

View File

@@ -52,6 +52,8 @@ class SelectList extends View
item.data('select-list-element', element)
@list.append(item)
@selectItem(@list.find('li:first'))
selectPreviousItem: ->
item = @getSelectedItem().prev()
item = @list.find('li:last') unless item.length