Skip to content

Commit

Permalink
Adding option to HtmlTable Behavior to specify reverse sort on startup.
Browse files Browse the repository at this point in the history
  • Loading branch information
anutron committed Jun 20, 2013
1 parent 781a763 commit 47e2d69
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions Docs/Interface/Behavior.HtmlTable.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ See also:

* sortOnStartup - (*boolean*; defaults to `false`) If `true` the table is sorted on startup. This is expensive; use sparingly.
* sortIndex - (*number*) This is the initial column to sort (if `sortOnStartup` is `true`). The first `th` that does not have the `noSort` class is used unless a `th` is found with the class `defaultSort`. If `sortOnStartup` is false, this is still used to add the classnames and styling to the column as if it were sorted.
* sortReverse - (*boolean*) if `true`, sorts the column reverse on startup (if `sortOnStartup` is `true`).
* parsers - (*array*) A mapping of parsers for each column of data. See the parsers defined in [HtmlTable.Sort][].
* sortable - (*booelan*; defaults to `false`) You can also give the table the css class `sortable` to set this flag to `true`.
* classNoSort - (*string*; defaults to `noSort`) The string given to column headers that are not sortable.
Expand Down
1 change: 1 addition & 0 deletions Source/Interface/Behavior.HtmlTable.js
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ Behavior.addGlobalFilter('HtmlTable', {
sortOnStartup: api.getAs(Boolean, 'sortOnStartup'),
sortIndex: api.getAs(Number, 'firstSort'),
sortable: api.getAs(Boolean, 'sortable', /* deprecated default: */ element.hasClass('sortable')),
sortReverse: api.getAs(Boolean, 'sortReverse'),
classNoSort: api.get('noSort'),
selectable: api.getAs(Boolean, 'selectable', /* deprecated default: */ element.hasClass('selectable') || multiselectable),
allowMultiSelect: multiselectable,
Expand Down

0 comments on commit 47e2d69

Please sign in to comment.