       target = @
       self.getDataTable().fnFilter target.value, $(".#{ self.getSelector() } .dataTables_wrapper tfoot input").index( target )
 
-# ##### preparePagination()
-Template.dataTable.preparePagination = ->
+# ##### initializeDisplayLength()
+Template.dataTable.initializeDisplayLength = ->
   unless $.select2
     $(".#{ @getSelector() } .dataTables_length select").select2 minimumResultsForSearch: "-1"
 

  instantiatedComponent.log "rendered", @
  instantiatedComponent.initialize()

# ##### destroyed()
# Currently nothing is done when the component is destroyed.
Template.dataTable.destroyed = ->

  @log "dataTable:set", dataTable.fnSettings()

# ##### prepareDataTable()
Template.dataTable.initializeDataTable = ->
  @setDataTable $(".#{ @getSelector() } table").dataTable( @getOptions() )

# ##### initializeFilters()
Template.dataTable.initializeFilters = ->
  @initializeFilterPlaceholder()
  @initializeFooterFilter()

# ##### initializeFilterPlaceholder()
Template.dataTable.initializeFilterPlaceholder = ->
  $(".#{ @getSelector() } .dataTables_filter input[type=text]").attr "placeholder", "Type to filter..."

# ##### prepareFooterFilter()
Template.dataTable.initializeFooterFilter = ->
  selector = @getSelector()
  if selector is 'datatable-add-row' and $.keyup
    self = @
