     @component.setState {
       firstRow
       lastRow
+      rowHeight: @getRowHeight()
       totalRows: @table.getRowsCount()
     }
 
     @firstRenderedRow = firstRow
     @lastRenderedRow = lastRow
+
+  asDisposable: (subscription) -> new Disposable -> subscription.off()

{View} = require 'atom'
{CompositeDisposable} = require 'event-kit'
React = require 'react-atom-fork'
TableComponent = require './table-component'


    @div class: 'table-edit', =>
      @table outlet: 'tableHeaderView', class: 'table-edit-header'
      @div outlet: 'scrollView', class: 'scroll-view', =>

  initialize: (@table) ->
    @subscriptions = new CompositeDisposable
    @scroll = 0

    props = {@table, parentView: this}
    @component = React.renderComponent(TableComponent(props), @scrollView[0])

    @subscriptions.add @table.onDidChangeRows @requestUpdate

    @subscriptions.add @asDisposable @scrollView.on 'scroll', @requestUpdate

  destroy: ->
    @subscriptions.dispose()
