facebookarchive / fixed-data-table

A React table component designed to allow presenting thousands of rows of data.
http://facebook.github.io/fixed-data-table/
Other
4.3k stars 553 forks source link

Magic number "2" in FixedDataTableNew._calculateState() #460

Open sgrogov opened 8 years ago

sgrogov commented 8 years ago

Hi guys. I have a trouble with customizing styles of fixed-data-table. Tables without horizontal borders have 2px of additional scrolling. I guess that problem is exactly in the magic number 2

var totalHeightReserved = props.footerHeight + props.headerHeight +
      groupHeaderHeight + 2 * BORDER_HEIGHT;

(https://github.com/facebook/fixed-data-table/blob/master/src/FixedDataTableNew.react.js#L873) It shall be calculated dynamically, isn't it?