   configureSettings(@)
 
 TemplateClass.rendered = ->
-  template = this
+  @tableInterval = setInterval =>
+    if @$('.reactive-table').length > 0
+      clearInterval(@tableInterval)
+      onTableRender.call(@)
+  , 100
+  
+onTableRender = ->
+  template = @
   data = @data
-  domNode = getDomNode(this)
-  settings = getSettings()
-  $table = $(@$('.reactive-table')).addClass('ui selectable table segment ' + (settings.cls ? ''))
+  domNode = getDomNode(@)
+  settings = getSettings(@)
+
+  $table = @$('.reactive-table').addClass('ui selectable table segment ' + (settings.cls ? ''))
   $collectionTable = @$('.collection-table')
 
   createHandlerContext = (extraArgs) ->


TemplateClass.destroyed = ->
  _.each @collectionHookHandles, (handle) -> handle.remove()

TemplateClass.events
  'click table.selectable tbody tr': (e, template) ->


configureSettings = (template) ->
  data = template.data
  unless data.settings?.collection?
    items = data.items
    collection = data.collection
    unless collection
      if items
        collection = Collections.get(items)
      else
        throw new Error('Either or both of "items" and "collection" attributes must be provided.')
    else
      collection = Collections.get(collection)
    unless items
      items = collection
    # Store them for use in helpers.
    template.items = items
    template.collection = collection
    unless collection
      console.warn 'No collection provided.', data
    else
      collectionName = data.collectionName or Collections.getName(collection)
      if collectionName
        collectionId = Strings.firstToLowerCase(Strings.singular(collectionName))
        template.createRoute = data.createRoute or collectionId + 'Create'
        template.editRoute = data.editRoute or collectionId + 'Edit'
      else
        console.warn 'No collection name provided', data

  tableId = template.tableId
  # Clone settings to ensure the original isn't modified in case it's used across different table
