Skip to content
Browse files

TableView: Allow default column sort to be specified as reverse

  • Loading branch information...
1 parent fc4bf30 commit 46bab3a45dc630c20887979b7d7d2fa0276d64a5 @tobico committed Feb 28, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/ST/TableView.coffee
View
4 lib/ST/TableView.coffee
@@ -47,11 +47,11 @@ ST.class 'TableView', 'View', ->
@_list.bind 'itemChanged', this, 'listItemChanged'
@_list.bind 'itemRemoved', this, 'listItemRemoved'
- @method 'setColumns', (columns, sortColumnIndex=0) ->
+ @method 'setColumns', (columns, sortColumnIndex=0, reverseSort=false) ->
@_columns = columns
for column, i in columns
column.index = i
- @sortColumn sortColumnIndex if columns.length > sortColumnIndex && @_sortColumn isnt columns[sortColumnIndex]
+ @sortColumn sortColumnIndex, reverseSort if columns.length > sortColumnIndex && @_sortColumn isnt columns[sortColumnIndex]
if @_loaded
@refreshHeader()
@refreshBody()

0 comments on commit 46bab3a

Please sign in to comment.
Something went wrong with that request. Please try again.