Add public API to set max items

This commit is contained in:
Kevin Sawicki
2014-02-14 09:31:26 -08:00
parent 8ac197074d
commit 883f6dd50b

View File

@@ -166,6 +166,11 @@ class SelectListView extends View
# filteredItemCount - The {Number} of items that pass the fuzzy filter test.
getEmptyMessage: (itemCount, filteredItemCount) -> 'No matches found'
# Public: Set the maximum numbers of items to display in the list.
#
# maxItems - The maximum {Number} of items to display.
setMaxItems: (@maxItems) ->
selectPreviousItemView: ->
view = @getSelectedItemView().prev()
view = @list.find('li:last') unless view.length