         @orderDirection = 'ASC'
 
     @log 'debug', @table_id, 'sortByColumn', @orderBy, 'direction', @orderDirection
+
+    # update store
     @preferencesStore('order', 'orderBy', @orderBy)
     @preferencesStore('order', 'orderDirection', @orderDirection)
     @render()

    ]

    @log 'debug', @table_id, 'leftColumnKey', leftColumnKey, leftWidth, 'rightColumnKey', rightColumnKey, rightWidth
    @preferencesStore('headerWidth', leftColumnKey, leftWidth)

    if rightColumnKey
      @preferencesStore('headerWidth', rightColumnKey, rightWidth)

  sortByColumn: (event) =>
    column = $(event.currentTarget).closest('[data-column-key]').attr('data-column-key')

    # sort
    if @orderBy isnt column
      @orderBy = column
      @orderDirection = 'ASC'


  onColResizeMouseup: =>
    $(document).off 'mousemove.resizeCol'

    # switch to percentage
    resizeBaseWidth = @resizeTargetLeft.parents('table').width()
    leftWidth = @resizeTargetLeft.outerWidth()
