         Session.set "#{tableName}-field-sort-order-#{fieldName}", tableOptions.sortOrder[fieldName].get()
         Session.set "#{tableName}-field-sort-direction-#{fieldName}", tableOptions.sortDirection[fieldName].get()
 
+  ###
+  # tableFields - creates the fields array to pass to the ReactiveTable within
+  # settings. Field criterial is added to the fields array of the tableOptions object on
+  # the template instance
+  #
+  # @param {object} instance, instance of template containing table
+  # @return {array} fields, array containing fields for ReactiveTable
+  ###
   tableFields: (instance) ->
     tableOptions = instance.tableOptions
     fields = []

      fields.push(tableField)
    fields

  gotoEvent: (event, instance) ->
    route = instance.tableOptions.name.slice(0, -1)
    if event.metaKey

module.exports =
  ###
  # manageTableSorting - Updates Session variables related to sorting of each
  # table field
  #
  # @param {object} instance, instance of template containing table
  ###
  manageTableSorting: (instance) ->
    tableOptions = instance.tableOptions
    fields = tableOptions.fields
