   # Legacy support for "sort" property.
   _.each fields, (field) ->
     sort = field.sort
-    if sort? and !field.sortDirection? then field.sortDirection = sort
+    if sort? and !field.sortDirection?
+      field.sortDirection = sort
+      delete field.sort
 
   template.showFilter = settings.showFilter
   # We handle the filter ourselves.

  settings.filters = [tableId]
  template.settings = settings

_.extend TemplateClass, methods

# Template methods.


domNodeField = 'domNodeField'
selectEventName = 'select'
TemplateClass = Template.collectionTable

getNextId = -> Collections.generateId()

